To set an external event server as FORMS’ event server, you must define an event handler for an event occurring before form processing starts— usually either AppStart or JobStarted— which creates an external event server object, connects to it, and then tell FORMS to use the object for its events.
In the following example, the connection between FORMS and the server object is accomplished by the call to the Connect method. The name Connect can be anything you like, but it must establish a link between the server object and the application object.
Function OnJobStarted ( ) As Long
Dim EvServObj As Object
Set EvServObj = CreateObject("EventServer.Root")
Call EvServObj.Connect(Application) 'Application is the FORMS application object
Call Application.SetEventServerObject(EvServObj)
OnJobStarted = EV_OK 'Return value to FORMS
End Function