MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WinForms (DpiUnawareGdiScaled): control renders in wrong location on scaled monitor
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
This is in reference to #1700 which, with V105, corrected the size of WebView2 on a scaled monitor.
However, the offset in relation to the application window is still not correct.
(We have various legacy components which tie us to DpiUnawareGdiScaled for the time being.)
See screenshots below.
Only the rendered pixels are in the wrong location - mouse events behave as if the controls are positioned correctly. (I.e. I have to click a lot to the right and a bit down from what I see onscreen.)
Version
SDK: 1.0.1293.44
Runtime: Beta 105.0.1343.10
Framework: WinForms
OS: Win11
Repro Steps
Create a WinForms app, use DpiUnawareGdiScaled
Embed a WebView2 control at an offset within the main app Form (e.g. within a TabPage)
Launch, and move between unscaled/scaled monitors
Screenshots
On an unscaled monitor (the little gear button is the top left of the WebView2 content):

On a 150% scaled monitor with version 105 (notice that the position is incorrect):

On a 150% scaled monitor before version 105 (for reference only, notice that v105 corrects size, not position):

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.