Cursor Position

  • Thread starter Thread starter KAB
  • Start date Start date
K

KAB

Hi:
I'm looking for VB.net code that can do two things.
1) Returns the X and Y position of the current position of the cursor
2) Inputting a value for X and Y will reposition the cursor to the values X
and Y.

Any help will be appreciated
Thanks
KAB
 
Hi:
I'm looking for VB.net code that can do two things.  
1) Returns the X and Y position of the current position of the cursor
2) Inputting a value for X and Y will reposition the cursor to the valuesX
and Y.

Any help will be appreciated
Thanks
KAB

Hi,
1)To get current Cursor position (X and Y), use Cursor class:
Cursor.Position.X
Cursor.Position.Y

2)To set, simply use Cursor's Position property to assign a new Point:
Cursor.Position = New Point(X, Y)

HTH,

Onur Güzel
 
Onur Güzel said:
Hi,
1)To get current Cursor position (X and Y), use Cursor class:
Cursor.Position.X
Cursor.Position.Y

2)To set, simply use Cursor's Position property to assign a new Point:
Cursor.Position = New Point(X, Y)

HTH,

Onur Güzel
Thanks Onur that's the answer I'm looking for.
KAB
 
Back
Top