textbox.focus - won't listen
-
On a certain condition, I want the focus to start with a different control then the first one. No matter what I do it won't listen to the command textbox7.focus. In the form load I put the command. In form activate I put the command. Is there an alternative to have to create something like a timer to activate to set focus after the form is fully visible... Any tips would be appreciated... Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
On a certain condition, I want the focus to start with a different control then the first one. No matter what I do it won't listen to the command textbox7.focus. In the form load I put the command. In form activate I put the command. Is there an alternative to have to create something like a timer to activate to set focus after the form is fully visible... Any tips would be appreciated... Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
Hello Nathan, You can try setting the TabIndex property of the control. You can use this in Form_load event. TextBox1.TabIndex = 0 I hope this helps. Regards, Allen
Allen Smith Software Engineer ComponentOne LLC www.componentone.com
-
Hello Nathan, You can try setting the TabIndex property of the control. You can use this in Form_load event. TextBox1.TabIndex = 0 I hope this helps. Regards, Allen
Allen Smith Software Engineer ComponentOne LLC www.componentone.com
if that control is the first or last textbox then that's ok solution. however by doing so wouldn't that screwup the tab order for the rest of the controls?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
if that control is the first or last textbox then that's ok solution. however by doing so wouldn't that screwup the tab order for the rest of the controls?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
incase anyone is curious you need to use the paint event and setup a static variable to only issue the focus command once...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
-
On a certain condition, I want the focus to start with a different control then the first one. No matter what I do it won't listen to the command textbox7.focus. In the form load I put the command. In form activate I put the command. Is there an alternative to have to create something like a timer to activate to set focus after the form is fully visible... Any tips would be appreciated... Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous