Moving Mouse Cursor to position and click 
Author Message
 Moving Mouse Cursor to position and click
Does anyone know how I could move the mouse to a new position (like (0,0))
and hack the mouse click that spot in VB.Net? I need this dont in visual
basic and cannot use another program to run the mouse for me since it runs
in the middle of the program. I have noticed that the old methods done in
the previous VB doesn't work and need an update. Also found        
System.Windows.Forms.Cursor.Position() but exactly sure how that works.

Sun, 15 Aug 2004 09:14:10 GMT  
 Moving Mouse Cursor to position and click
Here's a way to move the pointer in code:

'-- Begin sample code

        Dim pc As New System.Drawing.PointConverter()
        Dim pt As New System.Drawing.Point()

        pt = pc.ConvertFromString("240,240")

        Windows.Forms.Cursor.Position = pt

'-- End sample code

However, I can't find a way to cause a mouse click in code; are you sure
there's no way to just call the click event handler of whatever it is you
want the mouse to click on?

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit

Tue, 17 Aug 2004 05:33:15 GMT  
 Moving Mouse Cursor to position and click
thanks for all your help, but yes I do need it to click because it would
click on certain different spots at different points of the program. Thank
for you everything.

Tue, 17 Aug 2004 07:22:02 GMT  
 [ 3 post ] 

 Relevant Pages 

1. Setting mouse cursor position and clicking

2. simulate mouse click w/o moving cursor

3. How to move cursor on my desired position specifying primary key

4. how to get cursor position when double-clicked

5. Listbox: Get row from position of mouse-cursor

6. Tracking Mouse Cursor Position

7. system variables for mouse cursor position?

8. Need help positioning mouse cursor

9. Need help positioning mouse cursor

10. Need help positioning mouse cursor

11. How to detemine Mouse cursor position

12. Get Mouse cursor position


Powered by phpBB® Forum Software