• Advertisement
Sign in to follow this  

[.net] C# Resizing Forms

This topic is 3574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is probably really stupid and basic but I think I'm missing something with how the resizing and positioning works, and I can't seem to find anything helpful... I've got one control on a form which is positioned at (0, 45) and sized to (137, 601), and a second one which is positioned at (138, 45) and sized to (817, 617). So it seems that their combined width would be 954, but when the form is sized to be 954, they don't quite fit correctly.. This is all done at design time so I'm a little confused. As far as the height goes, I've got a toolbar control docked at the top (0, 0) sized to (948, 44), and the two controls mentioned already right below it. So again it seems the correct height for the form would be 662 but like before, this size cuts off the controls. I would attach a screen shot, but ever since I started using dual monitors I can't seem to capture screen shots anymore for some reason... sigh...

Share this post


Link to post
Share on other sites
Advertisement
Are you taking into account the width (border width I believe) of the form?

Share this post


Link to post
Share on other sites
Strange, no dual screen problems here. Pressing PrintScrn just captures both screens in one big bitmap.

Regarding your problem: are you working with the Size or the ClientSize of the Form? You should be using the latter as it takes into account what's left of the window (i.e. the client area) after subtracting title bar, borders, etc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement