Labels overlap text fields in Windows Form

I have a windows form size set to 1024, 78.  I have a few users, that when they open this form, the labels overlap the text fields.  This user has a screen resolution of 1920 x 1080.  The view icon setting is at medium.  I have the code below in the form but nothing changed.  I have attached a picture of what is happening.  Any suggestions?

Dim rect As Rectangle = My.Computer.Screen.Bounds
        If rect.Width < 1024 OrElse rect.Height < 768 Then

            ' Put the form in the upper left corner
            Me.Location = New Point(0, 0)
            Dim widthRatio As Double = rect.Width / 1024

            ' Get the ratio of screen height : form's original height
            Dim heightRatio As Double = rect.Height / 768
            ' Determine which ratio is smaller, and use the dimension
            ' with the smaller ratio to calculate the dimension with the
            ' larger ratio.  This ensures that the dimension with the
            ' smaller ratio will not exceed the bounds of the screen.
            If widthRatio < heightRatio Then
                ' Width ratio is smaller, so set the form to take up the
                ' entire width of the screen, and set height based on
                ' desired 4:3 aspect ratio.
                Me.Width = rect.Width
                Me.Height = CInt(Me.Width * 3 / 4)
            Else
                ' Height ratio is smaller, so set the form to take up the
                ' entire height of the screen, and set width based on
                ' desired 4:3 aspect ratio.
                Me.Height = rect.Height
                Me.Width = CInt(Me.Height * 4 / 3)
            End If
        End If
finselect.jpg
Karen WilsonProgrammerAsked:
Who is Participating?
 
Karen WilsonProgrammerAuthor Commented:
It's fixed!!
AutoScaleMode to DPI
AutoSize to True
AutoSizeMode to GrowAndShrink

Thanks to all that input.
0
 
Brian PringleSystems Analyst II, SCM, ERPCommented:
The user probably changed the font size in Windows to a larger size.  You could either have them change it back or hard-code your app's labels to be a specific font size.
0
 
Karen WilsonProgrammerAuthor Commented:
It appears that they have the display set to medium 125%.  I will try to hard-code the labels and see what happens.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
Karen WilsonProgrammerAuthor Commented:
I checked my form and I already have the font set at Arial 8 for all my labels.  Can I change their computer display to the smaller default size?
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
You should not change their computer display. If they set it to 125%, it is because this is how they want to work and you can give them headaches if you start playing with that setting. On my Windows 8 tablet for instance, I have to leave the setting à 125% otherwise the desktop interface is useless.

You can try to play with different settings with the AutoScale mode of the form. This has worked for me in my last application.
0
 
Karen WilsonProgrammerAuthor Commented:
I changed the autoscale mode to font and it remained the same for this user.  I'll keep changing it to see if I can get one to work.
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
You might also have an option saved in the users configuration, and loop through the controls on the form to set their Font at 6.5 or 6.75. With the 125% increase, they will come close to 8.
0
 
Karen WilsonProgrammerAuthor Commented:
Sorry it took me so long to come back to this.  I got sent off to another project.  Changing the font to 6 on the labels didn't work either.  Anyone else have any suggestions?
0
 
Karen WilsonProgrammerAuthor Commented:
I searched the internet and found the AutoScale to DPI.
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.