E
Emby
I recently released an app that looks and works fine under any desktop
resolution setting, but have discovered that if a user's machine has a DPI
setting above the standard 96 DPI, my forms are distorted and some controls
are even clipped, that is, off-screen. This is especially painful when the
clipped control is the close button for a modal dialog, and extremely so if
it's a dialog from which I've removed the "close box".
One can certainly argue the merits of such a design decision, but why
doesn't WinForms under VS8 (2005) properly handle the video settings of the
client machine.
To really handle this properly, it looks like I'd have to modify
autogenerated code in the form.Designer.cs (or .vb) file, which is where
controls are positioned and sized when they are instantiated on the form.
Sure, I could patch things up in the OnLoad override, but strictly speaking,
I think the code handling this issue belongs with the constructors and
initializers in the InitializeComponent routine.
Or have I missed something? Anyone have some guidance or opins on this?
Ah, OK, so I've read the help topic titled "Automatic Scaling in Windows
Forms", and it says that "Font" autoscaling is the default. I find it hard
to understand why the default behavior would clip controls under different
DPI conditions.
Can anyone please explain this to me ??
Thanks
resolution setting, but have discovered that if a user's machine has a DPI
setting above the standard 96 DPI, my forms are distorted and some controls
are even clipped, that is, off-screen. This is especially painful when the
clipped control is the close button for a modal dialog, and extremely so if
it's a dialog from which I've removed the "close box".
One can certainly argue the merits of such a design decision, but why
doesn't WinForms under VS8 (2005) properly handle the video settings of the
client machine.
To really handle this properly, it looks like I'd have to modify
autogenerated code in the form.Designer.cs (or .vb) file, which is where
controls are positioned and sized when they are instantiated on the form.
Sure, I could patch things up in the OnLoad override, but strictly speaking,
I think the code handling this issue belongs with the constructors and
initializers in the InitializeComponent routine.
Or have I missed something? Anyone have some guidance or opins on this?
Ah, OK, so I've read the help topic titled "Automatic Scaling in Windows
Forms", and it says that "Font" autoscaling is the default. I find it hard
to understand why the default behavior would clip controls under different
DPI conditions.
Can anyone please explain this to me ??
Thanks