etWindowsDialingProperties  Sample Program

TeleTools

The etWindowsDialingProperties sample program shows how to use the etLine1.CallPhoneNumber property and the etLine1.DeviceTranslatePhoneNumber to format a phone number in the canonical format from the Windows Dialing Properties Dialog.

Windows allows you to set "locations" whereby you can choose how to format a number for long distance, local and credit card calls.  TeleTools can take a phone number and translate it through your windows settings into the proper format.  You can then use this number in any program.

Click here for more information about Windows Dialing Properties.

Requirements
Using This Sample Program
Download this Sample Program 
How this Sample Program Works
Source Code
Release Notes

Development Environment Technical Information
Telephony Hardware Technical Information

Requirements

Any computer using Windows 95 or later

Using This Sample Program

Enter a phone number into the "Original Phone Number" text box and then check and unckeck the "Use Windows Dialing Properties" checkbox to see how the phone number is translated.  The canonical address (phone number) format is intended to be a universally constant directory number. For this reason, numbers in address books are best stored using canonical format. A canonical address is an ASCII string with the following structure:

+ CountryCode Space [(AreaCode) Space] SubscriberNumber | Subaddress ^ Name CRLF ...

For more information about the canonical format, check our help file or click HERE for more information.

Watch what happens if you put a + in front of a number or leave it out.  Try different types of numbers, some from your area code and others from out of your area or even your country.  Press the "Set Location" button to call up the Windows Dialing Properties Dialog Box and alter your location settings.

 

Download this Sample Program

For Use TeleTools v3.7

File

Purpose

EXE Ready to run!

Visual Basic 5,6

Source code

Delphi 5,6,7  Source code

Tell us what you need?

Click here and tell us what you need!

   

How this Sample Program Works

When you enter a phone number into the first TextBox, we check to see if the "Use Windows Dialing Properties" checkbox is checked.  If it is, then we set the property etLine.DeviceTranslatePhoneNumber to True and the number is translated through your settings in Windows' Dialing Properties Dialog.  If the checkbox is unchecked, then we pass the number as it was entered.

When the "Set Location" button is pressed, we call the etLine.SetLocation method which uses TAPI to bring up the Windows Dialing Properties Dialog. 

The entire program is really written around only 2 lines of code.

Control

Description

Text1

TextBox that holds the original phone number

Text2 TextBox that holds the translated phone number
CheckUseDialingProps CheckBox that toggles the phone number translation on and off
CommandSetLocation Button that brings up the Windows Dialing Properties Dialog
etLine1 The TeleTools etLine TAPI Telephony component that controls a TAPI line device

 

Event Handler Routine

Description

Form_Load

Enables the TeleTools etLine control and sets initial values

CheckUseDialingProps_Click Sets the property of the etLine1.DeviceTranslatePhoneNumber property to translate the phone number using the Windows Dialing Properties or not
CommandSetLocation_Click Call the Windows Dialing Properties Location dialog box
Text1_Change Copies the translated phone number and displays it in the Text2 text box

 

Subroutine

Description

None

We don't use any other subroutines in this sample

 

Release Notes

April 17, 2003

Published