ControlInvokeMethod Method
| Mercury.QTP.CustomServer Namespace > CustomServerBase Class : ControlInvokeMethod Method |
The method to invoke.
The arguments passed to the method. Zero or more arguments, passed as a comma-delimited list of values. Pass parameters only of data types that can be stored in a Variant.
Invokes a method of a control that is not thread-safe.
Remarks
If the InvokeRequired Property of a Control in a Windows Form is true, it is bound to a specific thread. Use this method to invoke the methods of such a source control.
For more information, see the MSDN documentation for System.Windows.Control.InvokeRequired.
For a Custom Server running in the testing tool context, pass only serialized types. If one of the objects in the list is not serialized, ControlInvokeMethod fails.
Syntax
'DeclarationProtected Function ControlInvokeMethod( _ ByVal sMethod As System.String, _ ByVal ParamArray list() As System.Object _ ) As System.Object
Parameters
- sMethod
- The method to invoke.
- list
- The arguments passed to the method. Zero or more arguments, passed as a comma-delimited list of values. Pass parameters only of data types that can be stored in a Variant.
Return Value

