dotnet / dotnet/winforms

DrawReversibleLine / DrawReversibleFrame draws in wrong position with multiple monitors

Open
#13,459 16 comments 0 reactions 0 assignees View on GitHub
area-System.Drawing external-OS-issue
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

9.0.5

### Did it work in .NET Framework?

Not tested/verified

### Did it work in any of the earlier releases of .NET Core or .NET 5+?

Code used to work. Seems like a regression in either dotnet or windows itself

### Issue description

Tracking for zooming a graph in an application that has been working for many years suddenly started misbehaving around 12/2024.

With multiple monitors only, the graphics operations appear in an incorrect position on the desktop, outside of the application's window.

See demo code below.

Also see this stack overflow issue:

https://stackoverflow.com/questions/79595420/system-windows-form-method-controlpaint-drawreversibleframe-seems-to-have-a-bu

### Steps to reproduce

Run this app on a system with latest windows and multiple monitors.
https://github.com/coderb/DrawReversibleLineBug

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.