Export (0) Print
Expand All

NativeWindow.DestroyHandle Method

Destroys the window and its handle.

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

Remarks

This method destroys the window associated with the Handle, sets the Handle property to 0, and calls the OnHandleChange method to reflect the change. Typically, you only call DestroyHandle when you are done with the native window.

Note   The NativeWindow class automatically will destroy the associated window and release its resources in response to a WM_DESTROY message.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

NativeWindow Class | NativeWindow Members | System.Windows.Forms Namespace | NativeWindow | Handle | AssignHandle | CreateHandle | ReleaseHandle | WndProc | OnHandleChange

Show:
© 2015 Microsoft