Link to home
Start Free TrialLog in
Avatar of JasonWilliam
JasonWilliam

asked on

Full screen form scale for different screen size?

Hey guys.  How do I figure out what size to set my form during development, given the following:

I'm using a 23" monitor with a 1920x1080 resolution.
My target is a 10.1" screen that also has 1920x1080 resolution.
If I set my Form.Size = 1920,1080 during development (Visual Studio 2010 and VB.net), I get a form that fills my development machine's screen.  However if I deploy the project to my target (with the 10.1" screen), I see only about 2/5th's of the total form on the target screen.

How do I figure out what size I need to set my form during development, so that it fills my target device's screen?

Thanks for your time.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Add this to Form_Load.
Me.WindowState = FormWindowState.Maximized
Avatar of JasonWilliam
JasonWilliam

ASKER

Thanks but that's not exactly what I'm after.  I have several graphical controls on this form that need to be in specific places on the screen.  The only way I can figure to get that positioning correct is to mimic on my development machine the end result size of the form when running on the 10.1" screen.
This article of mine will allow you to do that. It is VB6 code so you;ll need to convert it.
Thanks.  I see what you're after but that's far more than I need.  I simply need to understand how to figure out what size to set my form at design time to target it to a specific screen size at run time.
What happens when you try my first suggestion?
I'm not the best VB.net programmer so I was unable to convert it.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm glad I was able to help.

Marty - MVP 2009 to 2014
Thanks again.  I thought I'd accepted your last suggestion a long while ago.
No problem.