Solved

Screen and font resolution problem with vb application

Posted on 2013-05-30
9
1,097 Views
Last Modified: 2013-06-10
Hi All,

I had to write a vb application for work, haven't wrote an application in years because we are mostly doing .net web applications.

Having an issue with screen resolution and larger font sizes in windows. The application was designed with a form layout with controls just placed on form.

The problem I am having is on different resolutions, the form gets cut off, sometimes in have and you cant see the rest of the screen.

I have ensured that autoscalemode is set to DPI for the forms and that in the app.manifest I have
      <asmv1:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
        <dpiAware>true</dpiAware>
      </asmv1:windowsSettings>

Open in new window

What would be the next step to fix this issue so that the form displays and fits on all resolutions and font sizes properly. I have about 200 controls between the forms I have so I am hoping for an easier solution if possible.

Thanks
0
Comment
Question by:UFCWIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39210623
can you post your sample design part here ?
0
 

Author Comment

by:UFCWIT
ID: 39211566
I'll attached the designer code thank you
FormDelegateMaintenance.Designer.vb
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39212244
Hello,

you can use Anchor Tag to Change your Form according to Screen Resolution

Anchor Tag MSDN Help
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.anchor.aspx 

you need to adjust all Controls Anchor Tag.
0
Industry Leaders: 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!

 

Author Comment

by:UFCWIT
ID: 39216565
Hi Kalpesh2804,

I added anchoring to the a few controls to test it out

        Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
        Me.TableLayoutPanel1.Anchor = AnchorStyles.Top Or AnchorStyles.Left
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.Panel1.Anchor = AnchorStyles.Top Or AnchorStyles.Left
        Me.cbTTravelType = New System.Windows.Forms.ComboBox()
        Me.cbTTravelType.Anchor = AnchorStyles.Top Or AnchorStyles.Left

And no such luck, when I go to display it on a lower resolution xp machince, the form is cut in half and I can only see half the fields on the form, doing minimize or maximize on the form control does nothing either.

Thanks,

Alan
0
 

Author Comment

by:UFCWIT
ID: 39216592
This is what is does on 1024x768 (screenshot attached).
screenshot1.bmp
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 39217952
try below code.

        Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
        Me.TableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.Panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
        Me.cbTTravelType = New System.Windows.Forms.ComboBox()
        Me.cbTTravelType.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 

Open in new window


if you facing still problem then send me your actual form i will update some control and give you updated form
0
 

Author Comment

by:UFCWIT
ID: 39225467
hi Kalpesh,

I tried adding those tags and it was giving me errors, I am uploading the designer file and code behind now. thanks!
FormDelegateMaintenance.Designer.vb
FormDelegateMaintenance.vb
FormDelegateMaintenance.resx
0
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 50 total points
ID: 39225575
your Form is too large. you need to redesign complete form.

I attached here with sample project with few control. it will stretch/reduce size as per screen resolution.

i commented lots of code in your form because i don't decencies file

Download Project from below link

https://www.dropbox.com/s/1jaims1fd0uvvfs/WindowsApplication2.zip
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb wildfly example 2 75
VB.Net creating Contact in Outlook 1 59
WordPress: Debugging from my Windows 10 Desktop 6 67
VB.net Is there code behind PowerPivot 2 51
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.
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

730 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