Differing form size between XP and 7

Posted by Andy on Stack Overflow See other posts from Stack Overflow or by Andy
Published on 2010-04-03T19:27:23Z Indexed on 2010/04/03 19:33 UTC
Read the original article Hit count: 196

Filed under:
|
|
|
|

I am developing a C# WinForms app on my XP dev machine with Visual C# Express 2008.

I set the form to have a size of my liking with Width and Height on the designer and all looks good. I also set these dimensions to the MaximumSize property.

Deploying the app to another XP machine, and the app looks like it does on my dev.

However, in testing the app on a Win7 machine, the form has both horizontal and vertical scrollbars applied. I assume that this is due to the changed non-client size of the form, as determined by Win7. I can resize the window, but I would like it to be displayed correctly to begin with.

So, my question is: What is the best way to correctly maintain a form size client area across OS'es?

Thanks all.

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms