0

I am trying to create a Windows Forms app using Visual Studio 2017. The app should be run on a 1024x768 touchscreen eventually, that is why I am trying to make all forms in size 1024x768 and without a form border. The problem is that when I launch the app the buttons seem to shift slightly and this makes them fall partially off the screen. The text also seems to be displayed in reduced quality and/or another size. You can look at the images below as an illustration of what I mean.

This is what the form looks like in the designer view in Visual Studio. The text is clear, everything fits the screen and all text fits in the buttons Designer view of the form:

enter image description here

This second picture shows the form when I actually launch the app. The text quality is reduced, the 'Add From' text does not fit inside the button anymore and the bottom two buttons are partially off the form. View of the form when app is launched :

enter image description here

My form is set to AutoScaleMode: Font, AutoSize: False.

Are these form parameters wrong or is it something in my Visual Studio settings? I have no clue what I could do to fix this.

Thanks in advance.

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236

1 Answers1

1

The resolution differences looks like a DPI issue. Windows Forms doesn't scale well to a DPI other than 100%. Check your monitor settings. In Windows 10, this is labelled "Change the size of text, apps, and other items" in Display Settings.

Adam McMahon
  • 765
  • 3
  • 24