System.Windows.Forms
1.0.5000.0
2.0.0.0
System.MarshalByRefObject
System.Windows.Forms.IWin32Window
This class automatically manages window class creation and registration.
A window is not eligible for garbage collection when it is associated with a window handle. To ensure proper garbage collection, handles must either be destroyed manually using or released using .
The method is called when the WM_NCDESTROY message is processed. This means there are cases in which when you do not need to manually call , but it is good practice to do so.
The class provides the following properties and methods to manage handles: , , , , and .
Provides a low-level encapsulation of a window handle and a window procedure.
Constructor
This is the default constructor provided by the compiler. The class also has a static constructor that initializes application domain-wide message handlers and hash tables.
Initializes an instance of the class.
1.0.5000.0
2.0.0.0
Method
System.Void
intercepts window messages sent to the parameter. Use to reset the handle's window procedure to the default window procedure.
The method calls the method to indicate that the value of the property has changed.
The handle to assign cannot be in a different application process.
Assigns a handle to this window.
The handle to assign to this window.
1.0.5000.0
2.0.0.0
Method
System.Void
The parameter specifies the values that are passed to the native Win32 CreateWindowEx method to create a window and its handle.
When the field is not null, the newly created window handle inherits from the specified class. For example, if is set to BUTTON, the newly created window is based on the Win32 BUTTON window class. The property of the object must either be null or reference an instance of a class that was declared as a structure.
This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing.
The class name provided is registered with the operating system.
Creates a window and its handle with the specified creation parameters.
A that specifies the creation parameters for this window.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
System.Void
This method destroys the window associated with the , sets the property to 0, and calls the method to reflect the change. Typically, you only call when you are done with the native window.
The class automatically will destroy the associated window and release its resources in response to a WM_DESTROY message.
Destroys the window and its handle.
1.0.5000.0
2.0.0.0
Method
System.Void
The method removes the Win32 derived class associated with the current instance, releases the handle, and posts a WM_CLOSE message to the associated window.
Releases the resources associated with this window.
1.0.5000.0
2.0.0.0
Method
System.Windows.Forms.NativeWindow
If you receive a handle from another method, use this method to retrieve the window associated with the handle. The handle must already be owned by another in the current process; otherwise, null is returned.
Retrieves the window associated with the specified handle.
The associated with the specified handle. This method returns null when the handle does not have an associated window.
A handle to a window.
1.0.5000.0
2.0.0.0
Property
System.IntPtr
To be added.
Use this method when calling Windows API methods that require a handle for a window or control.
Gets the handle for this window.
1.0.5000.0
2.0.0.0
Method
System.Void
This method is invoked when the value of the property has changed.
Specifies a notification method that is called when the handle for a window is changed.
1.0.5000.0
2.0.0.0
Method
System.Void
Typically, handles thread exceptions.
When overridden in a derived class, manages an unhandled thread exception.
An that specifies the unhandled thread exception.
1.0.5000.0
2.0.0.0
Method
System.Void
This method does not destroy the window handle. Instead, it sets the handle's window procedure to the default window procedure. It sets the property to 0 and calls 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.
Releases the handle associated with this window.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0