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 );
Exception Type | Condition |
---|---|
Exception | This window already has a handle. |
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.
NativeWindow Class | NativeWindow Members | System.WinForms Namespace | NativeWindow | Handle | CreateHandle | DestroyHandle | ReleaseHandle | WndProc | OnHandleChange