Cursor Position

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
 
O

Onur Güzel

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
 
K

KAB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top