IWin32Window Interfejs
Definicja
Udostępnia interfejs umożliwiający uwidocznienie uchwytów HWND Win32.Provides an interface to expose Win32 HWND handles.
public interface class 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)]
public interface IWin32Window
type IWin32Window = interface
[<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
Public Interface IWin32Window
- Pochodne
- Atrybuty
Przykłady
Poniższy przykład ustawia Text Właściwość label1
na wartość Current Handle Form1
.The following example sets the Text property of label1
to the current Handle of Form1
. W tym przykładzie przyjęto założenie, że istnieje Form wywołana Form1
z Label wywołaniem label1
.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
Uwagi
Ten interfejs jest implementowany na obiektach, które uwidaczniają uchwyty Win32 HWND.This interface is implemented on objects that expose Win32 HWND handles. Dojście wynikowe może być używane z wywołaniami interfejsu API systemu Windows.The resultant handle can be used with Windows API calls.
Właściwości
Handle |
Pobiera uchwyt do okna reprezentowanego przez realizatora.Gets the handle to the window represented by the implementer. |