Whilst I am not sure exactly how this happens during the normal design time
process, I am able to reproduce the undesired behaviour by taking steps that
I would not normally take.
Start a new project.
Add a tab Control with 5 tabpages.
Select tabpage 5 and BringToFront.
Select tabpage 3 and BringToFront.
Build.
Close and reopen the form editor.
The tabpages should now be displayed in the order 3,5,1,2,4
Reorder the tabpages in the collection editor using the arrow buttons.
Tabpages 4 and 5 will always be the wrong way round after a rebuild, but
will appear to be correct whilst the form designer is not closed and
reopened.
By selecting the tabpages in the form designer and reordering them via
BringToFront, the correct order can be reset.
This method of reordering is outlined on my TabControls page:
http://dotnetrix.co.uk/tabcontrols.html
It's pretty simple to emulate the error, but I have no Idea why it happens
during the normal course of Design.
I may be totally off, but I suspect that there may be some unnecessary
zOrdering whilst maintaining the hidden Dock property of the tabpage. The
reason that I suspect this, is that I often change zOrder of Fill Docked
panels to get them Docked correctly , but of course, since only one tabpage
can be Visible at any one time, it is not necessary to change the zOrder and
so this may not be the case at all.