Sign in to follow this  
CandleJack

[.net] C# Resizing Forms

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this