raise mouse event on timer?

  • Thread starter Thread starter wanwan
  • Start date Start date
W

wanwan

I made a game with a window form that needs to record the mouse
position to an array at 100 samples per second, so I use the mouse
move event to do the job.

The problem is the mouse move event is raised by my software at max 30
times per second. I have determined I should use a timer event on
every 10 msec to raise the mouse event, but then I need the same mouse
event that is sent to the mouse move function in the mouse move event

how do I get that event in my timer?
 
I made a game with a window form that needs to record the mouse
position to an array at 100 samples per second, so I use the mouse
move event to do the job.

The problem is the mouse move event is raised by my software at max 30
times per second. I have determined I should use a timer event on
every 10 msec to raise the mouse event, but then I need the same mouse
event that is sent to the mouse move function in the mouse move event

how do I get that event in my timer?


Why not use Cursor.Position inside the timer to the the screen
coordinates? This seems more efficient than calling the mousemover
event that often.

Thanks,

Seth Rowe
 
Why not use Cursor.Position inside the timer to the the screen
coordinates? This seems more efficient than calling the mousemover
event that often.

Thanks,

Seth Rowe

I can't use screen coordinate because I'm tracking positions images in
the form in relation to the mouse position.... unless there is a way
to convert form coordinates to screen coordinates.

Please advise
 
I can't use screen coordinate because I'm tracking positions images in
the form in relation to the mouse position.... unless there is a way
to convert form coordinates to screen coordinates.

Please advise

PointToClient(Cursor.Position)

Thanks,

Seth Rowe
 
Back
Top