Leer en inglés

Compartir a través de


IWin32Window Interfaz

Definición

Proporciona una interfaz para exponer identificadores HWND Win32.

C#
[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
C#
public interface IWin32Window
Derivado
Atributos

Ejemplos

En el ejemplo siguiente se establece la Text propiedad de label1 en el actual Handle de Form1. En este ejemplo se supone que tiene un Form llamado Form1 con un Label llamado label1 en él.

C#
public Form1()
{
   InitializeComponent();

   this.label1.Text = this.Handle.ToString();
}

Comentarios

Esta interfaz se implementa en objetos que exponen identificadores HWND de Win32. El identificador resultante se puede usar con Windows llamadas API.

Propiedades

Handle

Obtiene el identificador para la ventana representada por el implementador.

Se aplica a

Producto Versiones
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7