System.Windows.Forms.NativeWindow.AssignHandle Method

Assigns a handle to this window.

Syntax

public void AssignHandle (IntPtr handle)

Parameters

handle
The handle to assign to this window.

Remarks

NativeWindow.WndProc(Message@) intercepts window messages sent to the handle parameter. Use NativeWindow.ReleaseHandle to reset the handle's window procedure to the default window procedure.

The NativeWindow.AssignHandle(IntPtr) method calls the NativeWindow.OnHandleChange method to indicate that the value of the NativeWindow.Handle property has changed.

Note:

The handle to assign cannot be in a different application process.

Requirements

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