Screen and font resolution problem with vb application

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
UFCWITAsked:
Who is Participating?
 
Kalpesh ChhatralaConnect With a Mentor Software ConsultantCommented:
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
 
Kalpesh ChhatralaSoftware ConsultantCommented:
can you post your sample design part here ?
0
 
UFCWITAuthor Commented:
I'll attached the designer code thank you
FormDelegateMaintenance.Designer.vb
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
Kalpesh ChhatralaSoftware ConsultantCommented:
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
 
UFCWITAuthor Commented:
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
 
UFCWITAuthor Commented:
This is what is does on 1024x768 (screenshot attached).
screenshot1.bmp
0
 
Kalpesh ChhatralaSoftware ConsultantCommented:
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
 
UFCWITAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.