I am having issues with some applications (mainly dashboard) that some user uses windows display scaling to make their icons bigger but this cause huge problems in my software. I am looking for a way to disable completely the scaling on my application and leave the application scaled to the pixels of the display resolution instead.
I have found this thread but it is 8 years old and windows 10 didn't exist at the time and another user gave an answer but it doesn't work either.
A simple example of the behavior happen mostly on dashboards as there is a lot of controls and widget on these kind of screens and they are critical for thing like robot machinery controller.
One example dashboard window is in it's minimum possible size 1900 x 980
(could be 4-5 pixel smaller in both direction but we rounded up to get rounded positions XY values). This resolution is just shy of 1920 x 1080
. It Cannot be smaller but you can make it larger if you have a bigger screen like 4K
and all you gain is more date in treeviews, better display in the 3d Engine renderer etc.
So some users have small laptop screen such as 15 inches that have a maximum resolution of 1920 x 1080
resolution but they use 150% scaling so my screen minimum size become 2850 x 1470
in their screen which make the application bigger than the screen and goes outside the screen.
An another example if i use a Windows Surface Pro which have a 2736 x 1824
resolution which is about 80% bigger than 1920 x 1080
the window does indeed still take the original 1900 x 980
pixels on the screen which make it look quite small so if you full screen it you see much more information in all controls. But then if you change scaling to 150% the screen now take again 2850 x 1470
pixels on the screen which is fitting perfectly on the height but on the width i am short by 100 pixels, and 100 pixels that's enough to loose the right part of my screen and you either cannot see the left most part or the right most part of the screen.
I tried the 3 auto scaling mode : DPI, Font and None and it doesn't work at all. It still stretch the screen no matter what. Changing the font of the forms doesn't help either, i manage to make it once work for few labels directly in the form but anything inside group box fail to change or grow twice in size compare to the rest.
Important points :
- Project are .net
4.5
and4.6
but there is no problem compiling them in4.7
if i need to for specific features. - WPF is out of the question. We took 3 years to implement it and ended up quickly with very bad performance with third party DLL and 3D Cad performance were simply abysmal.
- Screens are already optimized with the least amount of controls possible. out of the couple hundreds of screen and thousands of user controls about half of them are very close to the limit of
1920 x 1080
which is around 90% of our clients - I have received a suggestion of running a Virtual Machine on the client computer with 100% scaling which is not affected by the host computer. It is probably my last resort as it's very difficult to handle dedicated video card through VM especially CAD card such as Quadro and FireGL.
- Half the users use touch screen and we tried putting everything in a panel with 2 scrollbar and god it's awful and works once in a blue moon. So it's only good for mouse users and these users all have desktop AFAIK so 99% of them doesn't use scaling so they don't have the issue.
So is there anything nowadays that can fix or work around this issue ?