I use an ErrorProvider on my form to show errors.
This works fine as long as I don't use a TabControl.
When using a TabControl an error can happen on a TabPage that doesn't have the focus.
So I bring the TabPage with the error to front using this code:
Unfortunately this code brings the TabPage to front but it doesn't show the TabPage as being selected.
Having TabPage1, TabPage2 and TabPage3 with TabPage3 selected before validation and the error happening on TabPage1 it will show TabPage1 and it's controls but it still looks as if TabPage3 would be selected (heading "TabPage3" is in front).
Has anyone an idea to solve this problem?
Thanks in advance
Andy
This works fine as long as I don't use a TabControl.
When using a TabControl an error can happen on a TabPage that doesn't have the focus.
So I bring the TabPage with the error to front using this code:
Unfortunately this code brings the TabPage to front but it doesn't show the TabPage as being selected.
Visual Basic:
myTabPage.BringToFront()
myTabPage.Select()
myTabPage.Show()
myTabPage.Refresh()
Having TabPage1, TabPage2 and TabPage3 with TabPage3 selected before validation and the error happening on TabPage1 it will show TabPage1 and it's controls but it still looks as if TabPage3 would be selected (heading "TabPage3" is in front).
Has anyone an idea to solve this problem?
Thanks in advance
Andy