Heres another sample application for a different problem.
PLEASE FOLLOW THESE STEPS CAREFULLY
* Run it and two windows will pop up
* Resize both windows to make them bigger
* Switch to ''Tab number 0'' on both controls
* You will see one of the controls does not draw properly and a grey image is drawn over the yellow and orange panels inside. The size of the image is the size of the initial tab control when it is displayed.
* The only difference in the two windows is whether or not TabPages.Clear() was called in the constructor. This is indicated by the title bar of the window.
I have isolated the problem exactly:
* Add tabs to a tab control in the designer
* In the constructor for the form call TabPages.Clear() and then add new tabs.
* To those new tabs add colored panel controls.
If you dont have any tabs in the tab control in the designer OR you dont call TabPages.Clear() OR you call Controls.Clear() instead then the problem doesnt occur.
However you cant call Controls.Clear() as previously discussed because that breaks the tab navigation buttons.
I can resolve this by not adding any tabs in the designer although it would be nice to be able to do so to see a real tab control in the designer instead of an empty panel.
-simon
OneNoteTabBug_5497.zip