Event descriptions

Events are divided into the below categories. In addition to the events fired within FORMS, you can fire your own events using the FireEvent method located in the Application object.

Type of events

Associated with...

Field-level events

... a single field. Declared in the Events page of the Field dialog. Field-level events have names that begin with "Field" or "CompField".*

Form-level events

... a single form. Declared in the Events dialog, accessed from the Form settings dialog. Form-level events have names that begin with "Form" or "CompForm".*

Batch-level events

... a single batch. Declared in either the Events section of the Job description dialog or the Application-level events dialog (Settings menu). Batch-level events have names that begin with "Batch".

Set-level events

... events associated with a single set. Declared in the Events dialog, accessed from the Set definition dialog. Set-level events have names that begin with "Set" or "CompSet" .*

Job-level events

... a job description. Declared in the Events section of the Job description dialog. Job-level events have names that start with "Job" or "CompJob" .*

Application-level events

... a specific FORMS module. Declared in the Application-level events dialog (Settings menu). Application-level events have names that begin with "App" if they can be defined for any module. Otherwise, they begin with a module prefix ("Mngr", " Scan ", "Itrp", "Veri" or " Tran " ) indicating which module they apply to.

If you are using the new COM API, remember that Application stands for ManagerApp, ScanApp, InterpretApp, VerifyApp, or TransferApp, depending on which module you are using.

* Events beginning with Comp are backwards-compatible events only available for DLLs. See the File name and Function boxes in the Event details dialog.

Note

All events must return a value, and this value must be of type Long.

Return values for the events are EV_OK (defined as 0), EV_OK_ABORT (defined as 1), and EV_ERROR (defined as -1).

If you write an event handler in the Manager’s Visual Basic window, you can test the code directly in that window. However, the result is an execution error if the code calls methods that either require objects, or return objects or the event require arguments. This is because only the Application object is available in the Manager. Other objects are not available until production, that is, in the other modules.

Introduction to VBA and FORMS