IWin32Window Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides an interface to expose Win32 HWND handles.
public interface class IWin32Window
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IWin32Window
public interface IWin32Window
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("458AB8A2-A1EA-4d7b-8EBE-DEE5D3D9442C")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IWin32Window = interface
type IWin32Window = interface
Public Interface IWin32Window
- Derived
- Attributes
Examples
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.
public:
Form1()
{
InitializeComponent();
this->label1->Text = this->Handle.ToString();
}
public Form1()
{
InitializeComponent();
this.label1.Text = this.Handle.ToString();
}
Public Sub New()
InitializeComponent()
Me.label1.Text = Me.Handle.ToString()
End Sub
Remarks
This interface is implemented on objects that expose Win32 HWND handles. The resultant handle can be used with Windows API calls.
Properties
Handle |
Gets the handle to the window represented by the implementer. |
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET