MDI Application - some weird stuff

  • Thread starter Thread starter BradC
  • Start date Start date
B

BradC

I have an MDI parent application with several forms inside it.
As the user switches between forms, I am forcing a maximize to keep it
filling up the parent window.

When the user has one particular form displayed, sometimes the screen really
gets messed up.
It gets into this weird mode where the child form is still maximized inside
the parent, but it only takes up half the window! The bottom half is gray,
and only the top half shows the form content.

All the user has to do to make this happen is minimize and then restore the
MDI parent window.

Has anybody seen this before? Is there an event for when someone restores
the application from minimized?

Thanks for your help!
 
* "BradC said:
Has anybody seen this before? Is there an event for when someone restores
the application from minimized?

You can check that in the form's 'Resize' event handler.
 
The problem I posted 1/15/2004 7:43 AM entitled, "App Loses Focus Using Hide Method" sounds very close to the problem you are having. I wish someone would give me a response because it could possibly help you too - keep an eye on it. I did run 1 test where I set the main form back from maximized to its initial size before the hide method was executed and I noticed that part of the other app was on the desktop and part was overlaying some of my main form. The part on the destop continued to execute as the part on my main form remained static - now that's WEIRD STUFF.

Good Luck,
Steve Blumenstein
 
* "BradC said:
Let's see if this is the same problem. I took some screenshots, Before and
After.

The WEIRDEST thing is that once you encounter this problem, if you manually
resize the main form even a tiny bit, it snaps back to normal.

Really this colors *shocked*?!

Maybe it's a problem with the graphics driver. Does this behavior occur
on other machines too?
 
Yep. Occurs on development machines, workstations, and metaframe deployment.

I did determine that doing a
me.height -= 1
me.height += 1

will fix the problem and clear the gray, but only if it is not maximized,
and I've also discovered that putting the above code in the RESIZE event is
a horrible, horrible idea. :-)

Any other ideas? Its only this one form, too. Other child forms don't cause
this problem.
 
Back
Top