Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

mdi child form's size problem

hi,
I have a mdi and mdi child form.
if I run the mdi child form independently, the form size remains as it is at design time. If I run it through the mdi form. the mdi child form gets bigger when I open it.
Is there any property I can use to manage the form size ?

best regards

ny971181
0
ny971181
Asked:
ny971181
  • 2
1 Solution
 
clifABBCommented:
Two properties:
  .Height
  .Width

Set them as needed in the Form_Load event
0
 
ny971181Author Commented:
I really love to know why the form size is changed. any property to make it stay the same size?

thank you

ny971181

0
 
clifABBCommented:
The reason is because that's the way Windows works (I know it's a cop out, but it's true).
On non-mdichild forms, if it's property StartupPosition is 4 - Windows Default, when you open a sizable window, Windows calculates it's size as a percentage of it's parent.
On mdichild forms, the property StartupPosition is ignored and Windows internally sets it to Windows Default.

Your only other option is to set the BorderStyle to something other than sizable.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now