From an article I wrote in UTMag:
The bug that is the most irritating is probably the fact that the TabPages of a TabControl occasionally rearrange themselves (change the order of appearance). The problem was very frequent in VS.Net 2002. VS.Net 2003 improves it but didn’t completely fix the problem.
You can easily fix that once for all with simple code. You can use the following code to completely remove TabPages from the TabControl in re-add them in the correct order. It is important to notice that the content of TabPages will not be affected.
With TabControl1.TabPages
.Clear()
.Add(TabPage1)
.Add(TabPage2)
.Add(TabPage3)
.Add(TabPage4)
.Add(TabPage5)
End With
This code needs to be placed anywhere after the call to InitializeComponent. The Form’s Load event is a good place for that.
>I have a windows form with a tab control. The tabs in my designer are in a different order that the tabs in my project. How is this happening?
>
>TIA
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com