Solved

Full screen form scale for different screen size?

Posted on 2014-04-14
10
895 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 46

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 46

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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 46

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 46

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 46

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 46

Expert Comment

by:Martin Liss
ID: 40087435
No problem.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

777 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