View Full Version : dotNet Mouse Position
There just has to be a way to get the mouse position at any time? I have found "input.mouse" and then .getPosition but it is looking for something and I'm not sure what to provide it.
09-04-2009, 04:49 AM
a quick google search turned up this:
basically you can use the System.Windows.Forms.Cursor class to get / set the position of the mouse on screen like this:cursor = dotnetclass "System.Windows.Forms.Cursor"
-- get the position, returns a System.Drawing.Point
p = cursor.Position
-- move the mouse 200 units to the right
cursor.Position = dotnetobject "System.Drawing.Point" (p.x+200) p.yWhen i tried it, i had trouble accessing the cursor.position.X and .Y properties directly, storing the point in a variable first solved the problem
I didn't even think to go through the cursor calls. Thanks.
09-04-2009, 03:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.