Visual Fox Pro 6 Technical Information

Microsoft(R) Visual FoxPro(R)

Product Information
Supported Versions
Sample Programs
Project Setup
Technical Notes


Supported Version

ExceleTel provided Visual Fox Pro 6 sample programs.

We have not tested the ExceleTel TeleTools ActiveX with Visual Fox Pro .NET however according to Microsoft ActiveX's should work fine with the latest version.

Sample Programs

Click here for a complete list available sample programs provided by ExceleTel.

Here is a list of sample programs written for use with Visual Fox Pro 6:

To begin using the sample program use Windows Explorer to double click the *.SCX file.  This will cause Visual Fox Pro 6 to start with the current directory as its default.  This will allow the CurDir() function to be used to located the wave files.

Once VFP6 has started if the form was not automatically open you will need to do so manually. To run the form select the menu option "Form | Run Form".

Project Setup

The ExceleTel TeleTools ActiveX must first register them with Windows. This automatically done by the ExceleTel TeleTools Installation. 

Use the following steps to create a Visual Fox Pro 6 project:

  1. Run Visual FoxPro.

  2. From the File menu, select "New". Choose "Project" and "Wizard" from the dialog that appears, and hit "Ok".

  3. Fill in the "Project name" and "Project file" then click "Ok". Follow the steps in the wizard to create a project without any data associated with it.

  4. Select the "Documents" tab from the Project Manager.

  5. Select "Forms".

  6. Press the "New" button, and choose "New form" from the dialog that appears. A blank dialog box will appear for you to fill in with your form components.

Adding ActiveX Components to Visual Fox Pro

Add each control by selecting the ActiveX Control button from the Controls toolbar. A dialog box pops up displaying all registered controls. Scroll down to the ExceleTel controls and select the one you need. Or follow these steps:

  1. From the Tools menu, choose Options.

  2. In the Controls tab of the Options dialog box, choose ActiveX controls.

  3. In the Selected list, select the etLine, etPhone, etPlay and etRecord controls.
    Note that this list may not be in alphabetical order.

    If you have more than one version of TeleTools installed then you will see controls for both versions.  Be sure to select the correct control.  After adding the TeleTools control to a form check the AboutVersion property value.

  4. Choose Set as Default, and then choose OK.

  5. In the Form Controls toolbar, choose View Classes, and then choose ActiveX Controls.

    The ExceleTel TeleTools etRecord, etPlay, etPhone and etLine controls will now be visible.

  6. Place the controls on the form as needed.

  7. Set the AboutLoadSerialNumber property to True.
    Be sure to review the information in the section "Why Serial Numbers Are Important". This will explain how to use the AboutLoadSerialNumber properties to set the AboutSerialNumber properties.

  8. Before using a TeleTools control it must be enabled. This is done by setting the EnableControl property to True. 

Include File: You must add etttconst_vfp.h to each form in the project in order for the code to compile. It contains definitions used by the forms for interpreting information from telephony devices. While editing the form, select "Include File…" from the Form menu, and type the path and name of this file.


Technical Notes

According to the Visual Fox Pro documentation: "The AutoYield property should be set to false (.F.) when a form contains an ActiveX control." Therefore you will need to add the following line of code to your application:

Application.AutoYield = .F.

Note: With Microsoft's Visual Fox Pro we have noticed unpredictable results when trying to execute TeleTools methods from within TeleTools event handler routines. This is apparent with the IVR4Line sample application where the etLine.Call.Answer method is executed in the etLine.OnRing event. In many cases this appears to suppress subsequent events from firing. For example the etLine.OnConnected event may not fire.

Our research lead us to information from Microsoft that indicates that "This behavior is by design." Click here for more information.  We have found that bypassing the non-standard ActiveX wrapper fixes this.  You can do this by creating the components dynamically at runtime.  You can find notes on how to easily do this here.

Specifically with the etIVR4Line sample form, it was found that an event that is fired automatically by another event was not firing on a consistent basis (The OnRing event was calling the CallAnswer method, which should cause the OnConnected event to fire). Our work around was to add an Answer button to the form, to manually fire the OnConnected event or to make sure to create the controls dynamically at runtime rather than by dropping them on the form and causing FoxPro to place a wrapper around the control.