Esempio n. 1
0
 private void button1_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         ContextMenuStrip menu = new rightClickMenu(); //初始化menu
         menu.Show(button1, new Point(e.X, e.Y));      //在点(e.X, e.Y)处显示menu
     }
 }
 private void button1_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         ContextMenuStrip menu = new rightClickMenu();   //初始化menu
         menu.Show(button1, new Point(e.X, e.Y));   //在点(e.X, e.Y)处显示menu
     }
 }