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!

NativeWindow.AssignHandle

Assigns a handle to this window.

[Visual Basic]
Overridable Public Sub AssignHandle( _
   ByVal handle As Integer _
)
[C#]
public virtual void AssignHandle(
   int handle
);
[C++]
public: virtual void AssignHandle(
   int handle
);
[JScript]
public function AssignHandle(
   handle : int
);

Parameters

handle
The handle to assign to this window.

Exceptions

Exception Type Condition
Exception This window already has a handle.

Remarks

Any window messages sent to the handle are intercepted by WndProc. Use ReleaseHandle to reset the handle's window procedure to the default window procedure.

The AssignHandle method calls the OnHandleChange method to indicate that the value of the Handle property has changed.

See Also

NativeWindow Class | NativeWindow Members | System.WinForms Namespace | NativeWindow | Handle | CreateHandle | DestroyHandle | ReleaseHandle | WndProc | OnHandleChange