Provides a low-level encapsulation of a window handle and a window procedure. The class automatically manages window class creation and registration.
Object
MarshalByRefObject
NativeWindow
[Visual Basic] Public Class NativeWindow Inherits MarshalByRefObject [C#] public class NativeWindow : MarshalByRefObject [C++] public __gc class NativeWindow : public MarshalByRefObject [JScript] public class NativeWindow extends MarshalByRefObject
A window is not eligible for garbage collection when it is associated with a window handle. To ensure proper garbage collection, handles must manually be destroyed using DestroyHandle or Microsoft.Win32.Interop.Windows.DestroyWindow API, or released using ReleaseHandle.
The NativeWindow class provides the following procedure and methods to manage handles: Handle, CreateHandle, AssignHandle, DestroyHandle and ReleaseHandle.
Namespace: System.WinForms
Assembly: System.WinForms.dll