dynamically changing Windows Forms size according to screen resolution?

V

VMI

How can I change the size of the forms in my Windows application when the
screen resolution the user has is higher than the one I developed the
application in? I have a customer that has a screen resolution of 1600x1200
and I developed the application in a PC with 1024x768 resolution. Is it
possible to increase the forms' sizes accordingly?


Thanks.
 
M

Michael C

It's definitely possible, probable, and even advisable. Are you asking how
to do it?

The easiest method is just set your form's WindowState to Maximized. This
could leave a lot of whitespace on your form though, if your controls don't
adjust size to fill up more of the whitespace also. You can force the size
of controls to adjust whenever the form changes size by tying into the
..Resize event; or by using Panels and setting the proper Anchor and Dock
properties for your controls.

It's *really* hard to give you any definitive answers without knowing
*anything* about your form's layout though...

Thanks,
Michael C., MCDBA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top