DADiSP Worksheet Functions > Function Categories > ActiveX > Automation Client > GETCONTROL
Returns a handle to the current ActiveX control or server object in an event handler or custom dialog box.
GETCONTROL(id)
id |
- |
Optional, an integer, the control ID if the control is referenced in a custom dialog box. |
A handle to the running object or –1 if an error occurs.
Consider the following SPL function:
The handler is used to process events from Internet Explorer.
Each time the title displayed by Internet Explorer changes, MyEvent is called and a message box is displayed. The message box displays the status line text and the current title of the displayed web page.
Within an SPL event handler, GETCONTROL returns a handle to the calling ActiveX object. The handle can be used to further manipulate the object.
See REGISTEREVENT to register an SPL function to process and ActiveX event.