c#的winforms程序,我知道可以通过this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.FormShow_MouseMove);响应鼠标移动事件,但是该移动事件只能是鼠标在窗体客户区内才能发生。我需要鼠标在屏幕任何地方移动时都能发生的鼠标移动事件,请问应该怎么做?
我现在用了timer控件,感觉不够好:
private void timer1_Tick(object sender, EventArgs e)
{
this.label2.Text = string.Format("({0},{1})",
System.Windows.Forms.Cursor.Position.X,
System.Windows.Forms.Cursor.Position.Y);
}
我现在用了timer控件,感觉不够好:
private void timer1_Tick(object sender, EventArgs e)
{
this.label2.Text = string.Format("({0},{1})",
System.Windows.Forms.Cursor.Position.X,
System.Windows.Forms.Cursor.Position.Y);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货