Name

IWin32Window

Synopsis

This interface is implemented by classes that wrap a system window. Most visual classes in the Windows Forms framework ultimately wrap a Win32 window, and this interface is implemented by Control to support that. It provides the Handle property to retrieve the underlying HWND for the window.

Note that not everything that is apparently a window is actually a window. For example, all the components of the Win32 ExplorerBar are actually rendered into a single Win32 window.


public interface IWin32Window {

// Public Instance Properties

   public IntPtr Handle{get; }

}

Implemented By

Control

Returned By

System.Windows.Forms.Design.IUIService.GetDialogOwnerWindow()

Passed To

CommonDialog.ShowDialog(), System.Windows.Forms.Design.ComponentEditorForm.ShowForm(), System.Windows.Forms.Design.IUIService.ShowComponentEditor(), System.Windows.Forms.Design.WindowsFormsComponentEditor.EditComponent(), Form.ShowDialog(), MessageBox.Show()

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.