Link to home
Start Free TrialLog in
Avatar of Mr_Bach
Mr_Bach

asked on

C# Mouse point place?

I have 1 textbox with tabIndex =0;

I have 1 button, how can I do to move mouse point to tabIndex =0 when I click the button?

Please help me.
ASKER CERTIFIED SOLUTION
Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For moving mouse pointer use System.Windows.Forms.Cursor class
Position property.

Cursor.Position = new Point (X, Y);

If you'd like to switch focus - just call textBox.Focus() method
Avatar of oobayly
I agree with Aleksei_Malkov.
Also, moving the mouse cursor without input (I'm not counting the button click here) is not user friendly. As a user I should control the mouse position, not the application.