P
PvdG42
VS 2008 VB Winforms project, using a TabControl with several tab pages.
For data capture purposes, I need to set the focus on any given page to a
particular TextBox. I have tried the following without success:
1. Set Tab Order for each tab page at design time.
2. Call <controlName>.Focus() in the Form_Activated event procedure.
3. Call <controlName>.Focus() in the <TabControlName>.GotFocus() event
procedure.
4. Call <controlName>.Focus() in the <TabPageName>.GotFocus() event
procedure.
No matter what I do, the behavior is the same, so there must be something
I'm missing.
Behavior: When any given TabPage is brought to the foreground, there is no
visible sign as to what has focus, but when I hit Tab one time, the desired
control get the focus. I need to eliminate the need for the keystroke or
simulate it (which just occurred to me).
Trying SendKeys.Send(Keys.Tab) doesn't do it either.
Any suggestions?
For data capture purposes, I need to set the focus on any given page to a
particular TextBox. I have tried the following without success:
1. Set Tab Order for each tab page at design time.
2. Call <controlName>.Focus() in the Form_Activated event procedure.
3. Call <controlName>.Focus() in the <TabControlName>.GotFocus() event
procedure.
4. Call <controlName>.Focus() in the <TabPageName>.GotFocus() event
procedure.
No matter what I do, the behavior is the same, so there must be something
I'm missing.
Behavior: When any given TabPage is brought to the foreground, there is no
visible sign as to what has focus, but when I hit Tab one time, the desired
control get the focus. I need to eliminate the need for the keystroke or
simulate it (which just occurred to me).
Trying SendKeys.Send(Keys.Tab) doesn't do it either.
Any suggestions?