Provides an interface to expose Win32 HWND handles.
For a list of all members of this type, see IWin32Window Members.
[Visual Basic]
<ComVisible(True)>
<Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")>
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>
Public Interface IWin32Window
[C#]
[ComVisible(true)]
[Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IWin32Window
[C++]
[ComVisible(true)]
[Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")]
[InterfaceType(ComInterfaceType::InterfaceIsIUnknown)]
public __gc __interface IWin32Window
[JScript]
public
ComVisible(true)
Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)
interface IWin32Window Classes that Implement IWin32Window
| Class | Description |
| Control | Defines the base class for controls, which are components with visual representation. |
Remarks
This interface is implemented on objects that expose Win32 HWND handles. The resultant handle can be used with Win32 API calls.
Example
[Visual Basic, C#, C++] The following example sets the Text property of label1 to the current Handle of Form1. This example assumes that you have a Form called Form1 with a Label called label1 on it.
[Visual Basic]
Public Sub New()
InitializeComponent()
Me.label1.Text = Me.Handle.ToString()
End Sub
[C#]
public Form1()
{
InitializeComponent();
this.label1.Text = this.Handle.ToString();
}
[C++]
public:
Form1()
{
InitializeComponent();
this->label1->Text = this->Handle.ToString();
}
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Namespace: System.Windows.Forms
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
See Also
IWin32Window Members | System.Windows.Forms Namespace