Events

Visual LANSA

Events

This section shows how to use the events of an ActiveX control.

To see which events are available for the browser control display its Features (F2) and expand the list of its events.

The browser control has a DocumentComplete event which is triggered when the page has been found and downloaded. You can use this event to show a message when the page download is complete. Add this code to your form:

EVTROUTINE HANDLING(#VA_WEBCTL.DocumentComplete) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
use builtin(MESSAGE_BOX_SHOW) with_args(OK OK Information 'Page Ready' 'The web page has been downloaded.')
 

ENDROUTINE

 

Compile and execute the form. The completion message is displayed when the LANSA page has been downloaded:

Ý 7.1.7 Using an ActiveX Control