System.Windows.Forms.NativeWindow.ReleaseHandle Method

Releases the handle associated with this window.

Syntax

public virtual void ReleaseHandle ()

Remarks

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

A window automatically calls this method if it receives a native Win32 WM_NCDESTROY message, indicating that Windows has destroyed the handle.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0