JonF
JonF

Reputation: 2436

Can't adjust Winform width

Whenever I try to increase the form width in the properties box of VS 2008 it just resets my change back to 1300. It lets me lower the width, but not increase over 1300. How can I fix this? I have a datagrid in the form which has a width over 1300.

Upvotes: 4

Views: 5313

Answers (2)

SLaks
SLaks

Reputation: 887449

Windows in Windows cannot be larger than your screen resolution.

In code (eg, in the form's constructor), you can set any width you want, and it will be restricted by the end-user's screen resolution at runtime.

Your form should not need to be so big; consider redesigning your UI and/or using scrollbars.

Upvotes: 5

Davide Piras
Davide Piras

Reputation: 44605

you should check the Form.MaximumSize.Width property

Form.MaximumSize Property

so if you need to increase one of the two or both make sure that MaximumSize is also updated to your new values.

Edit: SLaks is correct that you cannot have the form bigger than the monitor anyway...

Upvotes: 3

Related Questions