Skip to content

[Problem/Bug]: The UI of an application appears to be frozen when user changes system Scaling #5247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AlexanderSchulz-Siemens opened this issue May 19, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AlexanderSchulz-Siemens

What happened?

We develop a WinForms application which is based on .NET4.8 target framework. We integrate a .NET8 web application which is presented in the target application using the WebView2 control. When the user opens the application, changes then the windows scaling setting for his main monitor and opens the control with the webview2 afterwards, then our entire application seems to be frozen.

After some investigation it turned out that it is not really frozen and the underlying system reacts to user interactions. So the WinForms message loop is still working behind. Also the menus like Context menu and Main strip menus are working as expected. Even if we manage somehow to close the WebView2 control in the application then this issue disappears, but reappears when we open it again. After further investigation it turned out that it is related to the DpiAwareness of the application and the WebView2 itself. This behavior is described in the comments of the following issue. At the end the proposed solution is to use PerMonitorV2 setting for the application.

Since our application uses DpiAwareness set to System which is defined in the app.config file, we tried this and it really seems to solve the issue. After discussing this change with the platform development of the application unfortunately it turned out that using the PerMonitorV2 setting is not an option, because using this mode might cause many other issues based on their previous experiments/experience. After discussing these issues with Microsoft support it turned out that these issues won't be solved on .NET 4.8 anymore, therefore this setting can't be changed.

This seems to be a critical issue from user point of view, because everything seems to be frozen. If the application is in full-screen mode at the moment when they enter this situation then they might even think that the entire system is broken, and the only option is to kill the application or restart the machine (and losing all unsaved changes).

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

Latest

SDK Version

Latest

Framework

Winforms

Operating System

Windows 11

OS Version

22631.5039

Repro steps

Demo app

dpifreezedemo-release.zip

Steps

  1. Open the attached demo app
  2. Change the Scaling in the display settings
  3. Click the button to open the WebView
  4. You are in the issue state now

Symptoms

  • The app UI seems to be frozen, but the File menu is still responding which indicates that the app is actually running well.
  • Window operations like maximize of the apps are also broken

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants