Defining event handlers

Use the Manager to define and set up event handlers using the Events dialog or tab for the level on which you want to implement the VBA or DLL. Instructions are below.

  1. Access the Events dialog. It contains a list of all event handlers defined for the context you accessed it for and is empty the first time you access it.

  2. Click New to open the Event details dialog. Specify the details of your event handler in the Event details dialog.

  3. Choose the predefined FORMS event for which you want to create an event handler from the Name box.

    Only events from the current context are visible in the Name box. For example, when you access the Events dialog from the Field dialog, the Name box only contains events that can occur during field processing. When you access it from the Form definition settings dialog, the Name box contains both events that can occur when forms are processed and events that can occur when fields are processed, since field events are owned by the form definition that contains the fields.

    Likewise, when you access the Events dialog from the Settings menu, you see all events that can occur in FORMS. You can also see events that are related only to the application itself and not to fields, forms, etc. Application-specific events have the prefix "App", for example AppCanClose and AppStart.

  4. Specify any VBA function to be called, the name of a DLL and DLL function, or both.

  5. In the Other data edit box you can specify any data that you want FORMS to make available to the VBA code or DLL. Think of this as parameters to be passed to the event handler, though the semantics differ from the ordinary way of specifying parameters.

  6. When a VBA function is specified, click Code to edit VBA source code in the Visual Basic window.

Notes

Four types of event handlers

Customizing ReadSoft: Events