Solved

Full screen form scale for different screen size?

Posted on 2014-04-14
10
879 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 45

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 45

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
 

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 45

Expert Comment

by:Martin Liss
ID: 40002082
What happens when you try my first suggestion?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

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

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 45

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 45

Expert Comment

by:Martin Liss
ID: 40087435
No problem.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now