Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.. frnds I have a problem i want to set the cursor on text box when the form load first time how we can set it i have also used TextBox1.focus() method but no result, plz help me...
Posted

Set the TabIndex[^] to 0. That would make it the first control to get focus. BTW, TextBox1.focus() should work anyway.
 
Share this answer
 
v2
Additional solution in c#:

on form_shown event
textbox.select()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900