IWin32Window Interface

Definição

Fornece uma interface para expor handles HWND do Win32.

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
[<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
Derivado
Atributos

Exemplos

O exemplo seguinte define a Text propriedade de label1 para a corrente Handle de Form1. Este exemplo assume que tens uma Form chamada com uma Label chamada label1Form1.

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

Observações

Esta interface é implementada em objetos que expõem handles HWND do Win32. O handle resultante pode ser usado com chamadas à API do Windows.

Propriedades

Name Description
Handle

Coloca a alavanca na janela representada pelo implementador.

Aplica-se a