views:

12

answers:

0

I have an application in Forms that has a lot of custom controls, all on panels within a home-grown tab control. So far, so good.

The problem comes from some systems, all XP. If you start the app from a shortcut, with the "Run Maximized" option selected, the application runs but the tabs do not paint properly. Also, the desktop seems to get its display corrupted too - regions appear to be copied.

We switch tabs by setting the previous tab's panel Visible = false, and the new panel Visible = true. After 2 switches, the visible property is set (Spy++ shows it) and the window is active (mouse cursors change, buttons work) but you still see the previous tab!

If I do not start maximized, or maximize after starting, the problem doesn't happen.

Does anyone have a clue?