Did you see : High DPI support in Windows Forms ?
Windows Forms C# application - Automatically handle DPI Scaling when a user sets the display to 125% or 150%

We had designed a Windows Form application such that it is suitable for all the resolutions. We came across a situation where the applications appear to be incorrectly sized when the user chooses 125% or 150% in the machine display setting . I have set the screen resolution to 1440x900 and changed the setting to 125% as shown in screenshot below
After making these settings to the machine and running the application, we found that the application appear to be incorrectly sized and the controls are getting overlapped with the other controls in the application
Can you please suggest any code/process for detecting the display settings i.e above 100% and handle the applications such that it appears correctly?
2 answers
Sort by: Most helpful
-
Castorix31 68,671 Reputation points
2020-12-07T08:21:42.577+00:00 Daniel Zhang-MSFT 9,476 Reputation points2020-12-08T05:22:11.79+00:00 Hi SrinivasKamalanathanAttipattu-9545,
First, you should change the AutoScaleMode of Form to the Dpi which Specifies the different types of automatic scaling modes supported by Windows Forms.
Then you can try to use dock and anchor properties to auto resize and adjust Form controls.
Here some related threads you can refer to.
Windows Forms DPI scaling
Creating a DPI-Aware Application
Automatic scaling in Windows Forms
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.