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();
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.
NativeWindow Class | NativeWindow Members | System.WinForms Namespace | NativeWindow | Handle | AssignHandle | CreateHandle | DestroyHandle | WndProc | OnHandleChange