AddHandler(String,Delegate) Method
| Mercury.QTP.CustomServer Namespace > CustomServerBase Class > AddHandler Method : AddHandler(String,Delegate) Method |
The control's event name (for example "Click").
Event handler.
Adds an Event handler in the AUT context. If other handlers exist for the event, the handler added with AddHandler is called first.
Remarks
Use this method if the source control serializes the event arguments. If the source control does not serialize the arguments, use CustomServerBase.AddHandler(string EventName, Delegate e, Type SerializedArgsType)
Handlers added via this method are released by the infrastructure. For an example, see EventsListenerBase.InitEventListener.
Syntax
'DeclarationProtected Overloads Sub AddHandler( _ ByVal EventName As System.String, _ ByVal oHandler As System.Delegate _ )
Parameters
- EventName
- The control's event name (for example "Click").
- oHandler
- Event handler.

