2

I'm trying to simulate a mouse move using the following code: mouse_event(MOUSEEVENTF_MOVE,150 ,150, 0, 0);

It works fine, but the X and Y coordinates start from my current cursor position. Is there a way I can make them start at the upper left of my screen?

I'm working in a Windows form app using c#

If you have no clue of what I'm asking, I tried to draw it for you;enter image description here

4

1 に答える 1

1

MSDN のドキュメントによると、フォームのカーソルの位置を簡単に設定できます。それをしてから、マウスイベントを送信してください。

System.Windows.Forms.Cursor.Position = new Point(0, 0);

あなたmouse_eventの後に続く、トリックを行う必要があります。

于 2013-04-23T17:07:44.363 に答える