private void allSelectedRouters_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { allSelectedRouters.SelectedIndex = allSelectedRouters.IndexFromPoint(e.Location); if (allSelectedRouters.SelectedIndex != -1) { MainContextMenuStrip.Show(Cursor.Position); } } }
public void ShowMainContextMenu(Point pos) { MainContextMenuStrip.Show((int)pos.X, (int)pos.Y); }