Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
You can add just one menu item or several items at a time to a ContextMenuStrip.
To add a single menu item to a ContextMenuStrip
Use the Add method to add one menu item to a ContextMenuStrip.
[Visual Basic]
Me.contextMenuStrip1.Items.Add(Me.toolStripMenuItem1)this.contextMenuStrip1.Items.Add(toolStripMenuItem1);
To add several menu items to a ContextMenuStrip
Use the AddRange method to add several menu items to a ContextMenuStrip.
[Visual Basic]
Me.contextMenuStrip1.Items.AddRange(New _ System.Windows.Forms.ToolStripItem() {Me.toolStripMenuItem1, _ Me.toolStripMenuItem2})this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItem1, this.toolStripMenuItem2});