Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Assume that you have a Windows Forms DPI-aware application on a computer that has the .NET Framework 4.7 installed. After you add all required configuration settings changes to a new project (and you make no other changes), and then you run the application on a different scaling level, the empty form is not scaled to the new level as expected.

Cause

This issue occurs because of the following reasons:


  • By default, AutoScaleDimensions property is not serialized. Therefore, there is no way to know at runtime whether the form should be scaled or whether the sizes are already scaled.

  • If the AutoScaleDimensions property is defined, it does not force a rescaling pass if no property is set on the form (or no controls are added). You can safely assume that if no property was changed, there is nothing to scale.

Workaround

To work around this issue, add any control to the form to make the scaling work correctly.

This issue is expected to be resolved in the .NET Framework 4.7.1.

For more information about known issues in the .NET Framework 4.7, see Known issues for .NET Framework 4.7.

More information

Creating a DPI-Aware Application


Application Settings for Windows Forms

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×