Expandir Minimizar
Este tema aún no ha recibido ninguna valoración - Valorar este tema

Control.ContextMenuChanged (Evento)

Actualización: noviembre 2007

Se produce cuando cambia el valor de la propiedad ContextMenu.

Espacio de nombres:  System.Windows.Forms
Ensamblado:  System.Windows.Forms (en System.Windows.Forms.dll)
[BrowsableAttribute(false)]
public event EventHandler ContextMenuChanged
/** @event */
/** @attribute BrowsableAttribute(false) */
public void add_ContextMenuChanged (EventHandler value)
/** @event */
/** @attribute BrowsableAttribute(false) */
public void remove_ContextMenuChanged (EventHandler value)

JScript no admite eventos.

Este evento se produce si la propiedad ContextMenu se modifica mediante programación o por la interacción del usuario.

Para obtener más información sobre la forma de controlar eventos, vea Utilizar eventos.

En el ejemplo de código siguiente se muestra un mensaje cuando se produce un cambio en el menú de acceso directo.

private void AddContextMenuChangedHandler()
{
   this.myTextBox.ContextMenuChanged += new EventHandler(TextBox_ContextMenuChanged);
}

private void TextBox_ContextMenuChanged(object sender, EventArgs e)
{
   MessageBox.Show("Shortcut menu of TextBox is changed.");
}


private void AddContextMenuChangedHandler()
{
    this.myTextBox.add_ContextMenuChanged(new EventHandler(
        TextBox_ContextMenuChanged));
} //AddContextMenuChangedHandler

private void TextBox_ContextMenuChanged(Object sender, EventArgs e)
{
    MessageBox.Show("Shortcut menu of TextBox is changed.");
} //TextBox_ContextMenuChanged


Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

.NET Framework

Compatible con: 3.5, 3.0, 2.0, 1.1, 1.0
¿Te ha resultado útil?
(Caracteres restantes: 1500)

Adiciones de comunidad

AGREGAR
© 2013 Microsoft. Reservados todos los derechos.