0

I've developed a Winforms application using vb.net 4.6.1 and I'm trying to have the forms scale based on the Scale and layout percentage as shown in the Windows 10 display options. Currently I have users that run 125%, 150% and 175% which can zoom the window so large that the user's can't see the bottom 1/3 of the form.

I'm not at all familiar with the autoscaling functionality so I've done some reading and simply confused myself even more. I'm not even sure if autoscaling will react when changing the size percentage rather than the resolution.

Currently I've set the following properties on my base form:

  • AutoScaleMode: DPI (Also tried Font and None)
  • AutoSize: True
  • AutoSizeMode: GrowAndShrink

None of these settings seems to affect the size of the form when loaded at 125%, 150% or 175% size percentage. If anyone has some insight on this I would be most grateful.

GunnerFan420
  • 198
  • 1
  • 12
  • [How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?](https://stackoverflow.com/a/13228495/7444103). Use TableLayoutPanels and/or FlowLayoutPanels (even nested) to organize your controls. The former can be configured quite easily to auto-resize the controls it hosts (by anchoring/docking). Also useful are wise combinations of docking and anchoring plus grouping controls in dedicated containers, set to Autoscroll when needed. – Jimi May 20 '19 at 18:08
  • Also, don't underestimate (or forget about :) the Maximum/MinimumSize properties. – Jimi May 20 '19 at 18:15
  • Thank you for your comments Jimi. I don't think I can get this to work to be honest. I tried using containers with no luck. I tried putting in setprocessdpi in the manifest and in sub main (had to turn application framework off for this one which messed up my windows security) and nothing I did... nothing.. .made those fields grow or shrink one little bit. Maybe it's the clickonce.. more than likely it's just be being clueless but I don't think I'm going to solve this one. Thank you, though, very much for responding. Cheers! – GunnerFan420 May 20 '19 at 20:45

0 Answers0