|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
ContextMenu (Clase)
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Menu
System.Windows.Forms.ContextMenu
Espacio de nombres: System.Windows.Forms
Ensamblado: System.Windows.Forms (en System.Windows.Forms.dll)
El tipo ContextMenu expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | ContextMenu() | |
![]() | ContextMenu(MenuItem[]) |
| Nombre | Descripción | |
|---|---|---|
![]() | CanRaiseEvents | |
![]() | Container | |
![]() | DesignMode | |
![]() | Events | |
![]() | Handle | |
![]() | IsParent | |
![]() | MdiListItem | |
![]() | MenuItems | |
![]() | Name | |
![]() | RightToLeft | |
![]() | Site | |
![]() | SourceControl | |
![]() | Tag |
| Nombre | Descripción | |
|---|---|---|
![]() | CloneMenu | |
![]() | CreateMenuHandle | |
![]() | CreateObjRef | |
![]() | Dispose() | |
![]() | Dispose(Boolean) | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | FindMenuItem | |
![]() | FindMergePosition | |
![]() | GetContextMenu | |
![]() | GetHashCode | |
![]() | GetLifetimeService | |
![]() | GetMainMenu | |
![]() | GetService | |
![]() | GetType | |
![]() | InitializeLifetimeService | |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | |
![]() | MergeMenu | |
![]() | OnCollapse | Infraestructura. |
![]() | OnPopup | Infraestructura. |
![]() | ProcessCmdKey(Message, Keys) | |
![]() | ProcessCmdKey(Message, Keys, Control) | |
![]() | Show(Control, Point) | |
![]() | Show(Control, Point, LeftRightAlignment) | |
![]() | ToString |
Nota |
|---|
private void MyPopupEventHandler(System.Object sender, System.EventArgs e) { // Define the MenuItem objects to display for the TextBox. MenuItem menuItem1 = new MenuItem("&Copy"); MenuItem menuItem2 = new MenuItem("&Find and Replace"); // Define the MenuItem object to display for the PictureBox. MenuItem menuItem3 = new MenuItem("C&hange Picture"); // Clear all previously added MenuItems. contextMenu1.MenuItems.Clear(); if(contextMenu1.SourceControl == textBox1) { // Add MenuItems to display for the TextBox. contextMenu1.MenuItems.Add(menuItem1); contextMenu1.MenuItems.Add(menuItem2); } else if(contextMenu1.SourceControl == pictureBox1) { // Add the MenuItem to display for the PictureBox. contextMenu1.MenuItems.Add(menuItem3); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
