• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 983
  • Last Modified:

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.
0
JasonWilliam
Asked:
JasonWilliam
  • 6
  • 4
1 Solution
 
Martin LissRetired ProgrammerCommented:
Add this to Form_Load.
Me.WindowState = FormWindowState.Maximized
0
 
JasonWilliamAuthor Commented:
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.
0
 
Martin LissRetired ProgrammerCommented:
This article of mine will allow you to do that. It is VB6 code so you;ll need to convert it.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
JasonWilliamAuthor Commented:
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.
0
 
Martin LissRetired ProgrammerCommented:
What happens when you try my first suggestion?
0
 
JasonWilliamAuthor Commented:
I'm not the best VB.net programmer so I was unable to convert it.
0
 
Martin LissRetired ProgrammerCommented:
I don't do .net but from what I've read you need to set your monitor to the smallest resolution that any of your users will use and then use the Anchor and Dock properties as explained in this article.
0
 
Martin LissRetired ProgrammerCommented:
I'm glad I was able to help.

Marty - MVP 2009 to 2014
0
 
JasonWilliamAuthor Commented:
Thanks again.  I thought I'd accepted your last suggestion a long while ago.
0
 
Martin LissRetired ProgrammerCommented:
No problem.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now