The PopupMenusManager lets you easily associate a PopupMenu with a control:
Once you drop a PopupMenusManager onto your form, you will see an extended "ContextMenu" property on all your controls. Set the property to the PopupMenu you just created. This will show the popup menu whenever you right-click on the control during run-time.
If you want to show a popup menu during some other event, read below for instructions to manually display the popup.
You can use the PopupMenusManager to associate a PopupMenu with a control as follows:
Instead, you could show the popup menu manually, as follows:
private void MouseClickedHandler(object sender, System.Windows.Forms.MouseEventArgs e)
if(e.Button == MouseButtons.Right)
this.popupMenu1.Show((Control)sender, new Point(e.X, e.Y));
Private Sub TreeViewAdv1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeViewAdv1.MouseClick
If e.Button = Windows.Forms.MouseButtons.Right Then
Me.PopupMenu1.Show(CType(sender, Control), New Point(e.X, e.Y))
This page will automatically be redirected to the sign-in page in 10 seconds.