dotnet / dotnet/winforms

WinForms HighDPI PerMonitorV2 RichTextBox looses formatting

Open
#5,205 12 comments 1 reaction 0 assignees View on GitHub
area-controls-RichEdit area-HDPI-PMv2
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

**.NET Core Version:**
SDK: 5.0.301 (ef17233f86)
Runtime: 5.0.7 (556582d964)

**Problem description:**
Moving a window containing a RichTextBox between two displays makes the RichTextBox drop all formattings when PerMonitorV2 is enabled.

Starting on main display:
![image](https://user-images.githubusercontent.com/80055480/124714685-58f03d00-df02-11eb-8b5a-66989e1b0ed1.png)

After being moved to second display:
![image](https://user-images.githubusercontent.com/80055480/124714693-5beb2d80-df02-11eb-8616-90fe2938b481.png)

Minimal repro:
A sample is attached here:
[TestDpiRichTextBox.zip](https://github.com/dotnet/winforms/files/6775074/TestDpiRichTextBox.zip)

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.