NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RichControl.BeginInvoke (Delegate, Object[])

Executes the given delegate on the thread that owns this Control's underlying window handle. The delegate is called asynchronously and this method returns immediately. You may call this from any thread, even the thread that owns the control's handle. If the control's handle doesn't exist yet, this will follow up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, BeginInvoke will throw an exception. Exceptions within the delegate method are considered untrapped and will be sent to the application's untrapped exception handler. There are five functions on a control that are safe to call from any thread: GetInvokeRequired, Invoke, BeginInvoke, EndInvoke and CreateGraphics. For all other metohd calls, you should use one of the invoke methods to marshal the call to the control's thread.

[Visual Basic]
Overloads Overridable Public Function BeginInvoke( _
   ByVal method As Delegate, _
   ByVal args() As Object _
) As IAsyncResult
[C#]
public virtual IAsyncResult BeginInvoke(
   Delegate method,
   object[] args
);
[C++]
public: virtual IAsyncResult* BeginInvoke(
   Delegate* method,
   Object* args[]
);
[JScript]
public function BeginInvoke(
   method : Delegate,
   args : Object[]
) : IAsyncResult;

Parameters

method
A delegate to a method that takes parameters of the same number and type that are contained in args.
args
An array of objects to pass as arguments to the given method. This can be null if no arguments are needed.

See Also

RichControl Class | RichControl Members | System.WinForms Namespace | RichControl.BeginInvoke Overload List