Solved

Screen and font resolution problem with vb application

Posted on 2013-05-30
9
1,019 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
  • 4
  • 4
9 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
Comment Utility
can you post your sample design part here ?
0
 

Author Comment

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

Expert Comment

by:Kalpesh Chhatrala
Comment Utility
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
 

Author Comment

by:UFCWIT
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

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

Expert Comment

by:Kalpesh Chhatrala
Comment Utility
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
Comment Utility
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
Comment Utility
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

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

743 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

17 Experts available now in Live!

Get 1:1 Help Now