I have mdi forms which takes long time to load and thus bring a lot of flickering to the screen. In order to prevent flickering i used the sendmessage API as described here How do I suspend painting for a control and its children?. We suspend painting of the main form of the app.
Doing this works fine except than we encountered various strange behaviours:
- If the user have a windows explorer instance behind, and he moves the mouse during the freeze, some parts of the left window of windows explorer begins to show up on the screen.
- Sometimes if the user click the mouse during paint freeze, our app looses the focus.
Is it because we freeze the main form ?
How could we prevent any drawing while loading our mdi form without any side effects?