A strange happened on the way to the forum

  • Thread starter Thread starter web1110
  • Start date Start date
W

web1110

I have a prototype program that has a blank main form. The form client area
is originally sized to half the screen height and width. A large control is
then displayed, centered in the form and it remains centered upon resizing.
everything worked like a champ.

Then I added a MainMenu to the form. Everything still works like a champ
EXCEPT, when I open the form the first time, the width is fine but the
height is the entire height of the screen. The form size and positioning
values look ok. After resizing, everything once, everything work fine
again. Does the addition of a menu do something to sizing?

If I remove the menu, it runs fine again. All I did was add a MainMenu with
a single MenuItem in it.
 
I cannot explain this one.

I checked the form size before making the control visible, it was correct.
I checked the form size after making the control visible, it was correct.

The form appeared with proper width and screen height. The control was the
proper height and width.

I circumvented the problem by resizing the parent form client area on the
VisibleChanged event of the control. I have no idea.
 
Back
Top