Click here to Skip to main content
15,849,996 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I meet a problem when I start my application on a notebook.
One windows form is too big for the screen and it is not complete shown.
It's because the height is too long, I think.

And I made also a simple test with just one form to check this. I did this:
stretch the buttom edge of the form downsides as far as it is much longer as my screen.
And then just run it. You'll see the form is outside.
But I expect to see that, the form resizes itself and all controls also resize themself to fit any new screens.
I didn't find any help with net searching machines. Some say to make the windows as maximized, but I tried this, and no changes happened.
I currently think about "anchor" and "dock", but are they not just for controls?

How can I solve this?

Thank you in advance!
Posted
Updated 21-Dec-12 0:13am
v2

1 solution

Once the form is up, you need to calculate screen size, and then adjust the form size. If all the internal controls already resize themselves, they will after the main form is repositioned. There is usually nothing to autmaticlaly make the form fit the screen unless it is 'maximized', so you have to do that yourself if it is showing 'normally'. Typically, you think of a window as being 'Maximized', 'Minimized', or 'Normal'. There is no requirement that a window in 'Normal' position will fit the screen - you must MAKE it fit the screen.
 
Share this answer
 
Comments
christmars 21-Dec-12 5:14am    
Hi there, so how should I MAKE it? :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900