I am trying to focus a textbox when the form loads. Although TextBox.Focus() works with most events, It do not work when in form load or activated. I would be grateful for help
I am trying to focus a textbox when the form loads. Although TextBox.Focus() works with most events, It do not work when in form load or activated. I would be grateful for help
Many thanks for your prompt response.
I have tried the alternatives you suggest without success. It¡¯s important for user friendliness to have an input textbox focused when the forms loaded. It would be surprising to say the least if MS development engineers have omitted this. In vb6 setfocus worked fine.
Help Please.
See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=799840&SiteID=1
You don't have to use 'settings' as in the example.
Just control 'activated' doing the select (focus) one time
as shown in the example.
Hi All
Sorry for the delay replying, business commitments are a huge inconvenience.
The Shown event as suggested by ahmedilyas seems to work fine, but only for initial form load. If the form is reactivated, at runtime the Focus() statement needs to inserted in the form Activated event.
I am still studying the code in the solution suggested by Tall Dude.
Many thanks to all
Hemo
Thanks for the addition info. I can use the Control, but the Tab will not suit my forms performance, however it¡¯s in my ¡®armoury¡¯ for future applications.
hemo