I have an MDI form with a centered background image.
Each time the user changes the size or state of the form, the image isn’t updated at all. It remains in the old place (not centered any more) and is even lost when the form is made too small.
How can this situation correctly be handled?
Do I really have to call “this.Refresh()” in all event handlers related to form size and state?
Application is realized in .net 3.5SP1 C# with Windows.Forms.
Unfortunately there doesn’t seem to be a super-quick way to do this, but the following is my solution and at least doesn’t seem to rely on coincidences.
In the mdi constructor, handle resizing:
And then this override to handle maximize/restore events
Constant values are defined as: