1

I'm developing a software in c# using Microsft Visual Studio 2017 where I have some comboboxes in it. Everything works correctly regardless of the screen resolution but, when I set a different scale from 100% all the comboboxes show very small.

Changing scale on Windows

See pictures below to better understanding:

100% Scale:

enter image description here

175% Scale: enter image description here

As you can see, combobox looks smaller as much as I get a bigger scale factor in my Windows configuration. How can I maintain the same size ratio when I change the scale?

These are the settings that I have for my comboBox: enter image description here

And this are the settings of my form:

enter image description here

Thanks for the help!

Victor P.
  • 97
  • 10
  • 1
    Edit you `app.manifest` (add one if, for some reasons, is missing in your Project). The usual link: [How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?](https://stackoverflow.com/questions/13228185/how-to-configure-an-app-to-run-correctly-on-a-machine-with-a-high-dpi-setting-e?answertab=active#tab-top). And some advices/experience sharing: [How to write WinForms code that auto-scales to system font and dpi settings?](https://stackoverflow.com/questions/22735174/how-to-write-winforms-code-that-auto-scales-to-system-font-and-dpi-settings). – Jimi Jul 25 '18 at 17:49

2 Answers2

0

I think you should set the Forms properties to

  • AutoSize = True
  • AutoSizeMode = GrowAndShrink

( I've also seen that in combination with these settings above the AutoScaleMode was set to "None" before it actually worked)

Can you give that a try?

Theo
  • 57,719
  • 8
  • 24
  • 41
0

Finally I found a way that "solved" the problem. After creating the .exe file, I make right click and select Properties:

After that, select Compatibility and set this configuration (I'm sorry, my SO is in spanish):

enter image description here

After setting this, Windows will rescale correctly.

Victor P.
  • 97
  • 10