Is there a reason why .NET WinForms TabPage does not completely redraw its background when resizing a form? It should be completely white (on Windows 7), but the part remains gray ( SystemColors.Control , most likely). Whenever I click the maximize button, the current visible TabPage background TabPage not redrawn. In addition, if I resize it, I need to move the form off the screen so that it is colored.
The same thing happens if I minimize and then restore shape. In this case, the TabPage background remains gray. Child controls are displayed correctly (labels, for example, retain their white background).
I am using the 32-bit version of Windows 7, .NET 3.5. Tab management was added using the Visual Studio constructor and contains a couple of shortcuts and two text fields. I have not changed the flags of my own style associated with messages with paint.
[change]
I created a test project, the source is uploaded here .
This is what the window looks like:

This is what the window looks like after I hide it and then restored it:

Notice the change in the background color of the TabPage .
source share