MDI Child Maximize Issue

G

Guest

There seems to be a problem with opening a MDI child form with the initial
WindowState set to Maximized when the MDI parent has a menu. This is a new
problem in .Net 2.0. The same code worked correctly in .Net 1.1.

The window is painted in the non-maximized state but the form acts as if it
is maximized. The child is displayed in the top left of the parents client
area and the child cannot be moved. Furthermore, the minimize, restore, and
close buttons are displayed in the parent frame.

I have been able to reproduce this in a very simple application. It contains
a MDI parent with a menu and a MDI child with nothing on it. The only code in
the project (other than the generated code) is in the parent to launch the
MDI child in the maximized state. I will make the sample project available
upon request (just let me know the email address to send it to).
 
G

Guest

I've been having the same issue. I haven't found the solution yet but I
thought I'd let you know you're not the only one with this issue.
 
P

Paladin

I've found a solution to this prolem, but it only works if you leave the child form's border to sizable. In the code that creates your new window set the forms windowstate property to

Example code:

Dim f As New New_Customer
f.MdiParent = Me
f.WindowState = FormWindowState.Maximized
f.Show()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top