Connect(ByRef ehApp As Object, ByRef strInifile As String, ByRef strIniSection As String) As Long

A plug-in method

Description

When a FORMS module starts, it loads all plug-ins listed in Ehlocal.ini.

FORMS requires that the plug-in has a method called Connect that has this signature. This is the one and only time your plug-in gets access to FORMS’ application object.

Return value

Always return EV_OK.

Remarks

Every plug-in must contain this method with exactly this signature. You always receive the COM application object, which consists of one of these objects: ManagerApp, ScanApp, InterpretApp, VerifyApp, TransferApp.

If you prefer to use only the Classic API, change this line:

Set gItrpApp = ehApp     ð     Set gItrpApp = ehApp.GetClassicObject

Note: In FORMS 5-3 and later, the strInifile parameter contains the full path to the Ehlocal.ini file.

Example: C:\Users\Public\ReadSoft\FORMS\ehlocal.ini

In earlier versions of FORMS, the strInifile parameter contains only the file name.

Example

Function Connect(ByRef ehApp As Object, ByRef strInifile As String, ByRef strIniSection As String) As Long

 

    'Setup global App object

    Set gItrpApp = ehApp

 

    'Time to subscribe to all events you like

    Call EventSubscribe

 

    Connect = EV_OK 

End Function

Usage

Always save a reference to FORMS’ application object and subscribe to those events you are interested in.

Plug-in methods to use in extensions for FORMS

Initialization of FORMS extensions

Using an ActiveX object as a FORMS extension

Migrating FORMS customizations to recent operating systems