Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Introduction to External Program Interfaces : COM objects: Automation objects and ActiveX controls : Support for ActiveX control events
 
Support for ActiveX control events
ActiveX controls respond to events much like ABL widgets. ActiveX controls that provide a user interface typically generate user-interface events, similar to user-interface widgets. However, ActiveX controls can support other types of functionality that generate other types of events, such as events that notify the arrival of a message for a communications application or the change in temperature of a manufacturing process for a data acquisition application.
Also, unlike widget events, ActiveX control events can pass parameters like a procedure call. Thus, ABL provides a type of internal procedure (OCX event procedure) to handle ActiveX control events. You can handle any ActiveX control event using an OCX event procedure.
ABL also allows you to handle certain events on the control-frame widget instead of on the ActiveX control. When ActiveX controls have focus, they generally take over the input and your application receives most events directly as ActiveX control events. However, when an ActiveX control has no equivalent event or when it is necessary to manage the orientation of the control in the ABL user interface, you can handle some input actions as field-level widget events on the control-frame. You can handle these widget events using the standard ABL ON statement, but ABL executes only one event handler (an ABL trigger or an OCX event procedure) per event.
For more information on handling events for ActiveX controls, see ActiveX Control Support.