我想为中鼠标位置的最佳方式。

I,M现在设置的鼠标位置的值在变量让他们在另一方法“像Form1_Click”。

有没有更好的办法做到这一点??

非常感谢你。

其他提示

xm=System.Windows.Forms.Cursor.Position.X - this.Location.X
ym=System.Windows.Forms.Cursor.Position.Y - this.Location.Y

那么你应该做的:

xm - form border x 
ym - form border y
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top