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.ReleaseHandle

Releases the handle associated with this window.

[Visual Basic]
Overridable Public Sub ReleaseHandle()
[C#]
public virtual void ReleaseHandle();
[C++]
public: virtual void ReleaseHandle();
[JScript]
public function ReleaseHandle();

Remarks

This method does not destroy the window's handle. Instead, it sets the handle's window procedure to the default window procedure. It sets the Handle property to zero and calls OnHandleChange to reflect the change.

In addition, a window automatically calls this method if it receives a Microsoft.Win32.Interop.win.WM_NCDESTROY window message, indicating that Windows has destroyed the handle.

See Also

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