Solved

Screen and font resolution problem with vb application

Posted on 2013-05-30
9
1,030 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
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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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.
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…
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 video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

910 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

19 Experts available now in Live!

Get 1:1 Help Now