Solved

Full screen form scale for different screen size?

Posted on 2014-04-14
10
901 Views
Last Modified: 2014-05-23
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
Comment
Question by:JasonWilliam
  • 6
  • 4
10 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40001718
Add this to Form_Load.
Me.WindowState = FormWindowState.Maximized
0
 

Author Comment

by:JasonWilliam
ID: 40001736
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
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40001783
This article of mine will allow you to do that. It is VB6 code so you;ll need to convert it.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:JasonWilliam
ID: 40002044
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
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40002082
What happens when you try my first suggestion?
0
 

Author Comment

by:JasonWilliam
ID: 40002128
I'm not the best VB.net programmer so I was unable to convert it.
0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40002235
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
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40087429
I'm glad I was able to help.

Marty - MVP 2009 to 2014
0
 

Author Comment

by:JasonWilliam
ID: 40087433
Thanks again.  I thought I'd accepted your last suggestion a long while ago.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40087435
No problem.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VbScript to countdown to New Year's Day 6 78
sp_configure 'external scripts enabled', 1; 7 107
batch file or script 4 47
print bytes of an integer 6 21
This article will show, step by step, how to integrate R code into a R Sweave document
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question