日期:2014-05-18 浏览次数:20984 次
public partial class Form1 : Form { Timer timer = new Timer(); public Form1() { InitializeComponent(); timer.Interval = 100; timer.Start(); timer.Tick += delegate { string s = ""; switch (Control.MouseButtons) { case MouseButtons.Left: s = "Left"; break; case MouseButtons.Middle: s = "Middle"; break; case MouseButtons.Right: s = "Right"; break; } this.Text = s; }; } }
------解决方案--------------------
if (MouseButtons == MouseButtons.Left)
MessageBox.Show("mouse left click ");