Strange maximize behaviour

G

Guest

VB2005

I have an MDI application, which displays modal forms correctly, and starts
up with the MDI form maximized

however for non modal forms behavious is unusual
all forms have MaximizeBox, Minimizebox and ControlBox set to false
and WindowState = Maximized

when the form displays it displays with the same size as in the Form Designer
with a ControlBox, greyed out MinimizeBox and the Maximize box enabled but
showing restore.

scenario one - click restore
the form grows in size( but not full screen) and the Maximize box changes to
show maximize rather than restore
if maximize is clicked the form then appears correctly, maximized with the
MDI form

scenario two - click restore on the application
the application behaves correctly and the form then maximizes correctly
within the MDI form

whats going on here?

*guy*
 
G

Guest

correction:-
in both scenarios the form does not eventually display correctly, a title
bar with controlbox etc appears ***above *** the MDI form menu bar, and also
displays full width, even though the child form is not full width due to a
panel on the MDI Container
 
M

Martin

To start an MDI child maximized setting the WindowState property of the form
at design time doesn't seem to help. I found that setting the WindowState
property (again) in the Form_Load event of the child form itself solves the
problem.

Guess it's a bug, I heard that the Beta of VB2005 did not have this
behaviour...
 
G

Guest

Thanks Martin, mine must be a different bug!
if i do set the windowState to normal then to maximized it works - sort of!
but it looks horrible

cheers

guy
 

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