?
Solved

Screen and font resolution problem with vb application

Posted on 2013-05-30
9
Medium Priority
?
1,166 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 200 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

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!

Question has a verified solution.

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

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.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

800 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