Applies to TestComplete 14.40, last modified on May 21, 2020
Event control is used to manage events that can be
handled by TestComplete. This is an ActiveX control. It can be used either
in TestComplete or in any other external application. The unique feature of this control is
that you can modify the list of its events using the TestComplete Events project item.
Adding Events to Event Controls
Removing Events From Event Controls
for more information.
Event control includes the following methods:
Event control to the Obj object. Obj must implement the
IDispatch interface. After the
Event control has been attached,
it can handle Obj events that are added to the control.
Note that if you are going to handle a COM application event that corresponds to a COM-server application (for instance, Microsoft Word or Outlook application), you should specify the application COM object rather than the TestComplete
process object that corresponds to the desired program. For instance, in the case of Outlook, specify the
Application object that is returned by the
Sys.OleObject property or the
objOutlook = getActiveXObject("Outlook.Application");
objOutlook = Sys.OleObject("Outlook.Application");
objOutlook = Sys.OleObject["Outlook.Application"]
Set objOutlook = Sys.OleObject("Outlook.Application")
objOutlook : OleVariant;
objOutlook := Sys.OleObject('Outlook.Application');
objOutlook = Sys["OleObject"]("Outlook.Application");
|Used by Connected Applications to attach to the given
Event control. After attaching to TestComplete, you will be able to handle TestComplete events that are added to the given
Event control (for the full list of TestComplete events, see TestComplete Events).
Event control from the object Obj. Note that after the
Event control has been detached, you will not be able to handle these events.
|Used by Connected Applications to detach the given
Event control from TestComplete. Note that after detaching from TestComplete, you will not be able to handle TestComplete events added to the
Event control only contains the
DetachFromTestComplete methods if you added TestComplete events to the control.
See the following topics for more information on how to use these methods:
Handling Events - Overview