# High DPI and Scaling

> Fix blurry or wrongly scaled editors in TX Text Control .NET for Windows Forms: DPI awareness, per-monitor scaling in app.config or Program.cs, ribbon icons.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Troubleshooting > High DPI and Scaling
- **707 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/dpi-scaling/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/dpi-scaling/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/dpi-scaling/llms-full.txt

---

On a display with a scale factor above 100%, or when a window moves between monitors with different scale factors, the editor, its ribbon and its toolbars can look blurry or keep the wrong size. TX Text Control shows no message in these cases: what you see is the symptom. The problems below have a known cause in how the application declares its DPI awareness. [High DPI and Display Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/llms-full.txt) describes how to set up scaling in a new application.

### The Application Looks Blurry on a High-Resolution Display

The `TextControl`, the ribbon and the dialog boxes look blurry or washed out on a display with a scale factor above 100%.

An application that doesn't declare itself DPI aware is scaled by Windows: the finished image of the window is stretched to the size the display needs, which makes it blurry. TX Text Control draws sharply only in a DPI-aware application, as [How TX Text Control Scales](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/#how-tx-text-control-scales) explains.

1. Declare the application DPI aware, as the next section shows.
2. Rebuild and start the application on the high-resolution display.

### The Editor Doesn't Rescale on Another Monitor

The editor has the right size on one monitor, but looks blurry or too small or too large when the window moves to a monitor with another scale factor, or after the user changes the scale factor while the application runs.

Since version 29.0, the `TextControl` and its toolbars and ribbons rescale when the window moves to another display or the scale factor changes, but only in an application that declares itself per-monitor DPI aware.

1. In a .NET project, call `Application.SetHighDpiMode(HighDpiMode.PerMonitorV2)` in *Program.cs*, as [Make a .NET Application DPI Aware](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/#make-a-net-application-dpi-aware) shows.
2. In a .NET Framework 4.7 or later project, add the `DpiAwareness` key with the value `PerMonitorV2` to *App.config*, as [Make a .NET Framework Application DPI Aware](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/#make-a-net-framework-application-dpi-aware) shows.
3. Rebuild the application.

### Custom Ribbon Buttons Keep Their Old Icon Size

After the scale factor changes, the built-in ribbon items are sharp and have the right size, but buttons your code added to the ribbon or the application menu keep icons of the old size.

TX Text Control rescales the icons of its own items. An icon your code assigns to a button is a fixed image, and TX Text Control doesn't know how to replace it.

1. Handle the Windows message `WM_DPICHANGED` of the form, and set [SmallIcon](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonbutton/smallicon-property/llms-full.txt) and [LargeIcon](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonbutton/largeicon-property/llms-full.txt) of each of your buttons again, with images for the new DPI from the [ResourceProvider](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms/resourceprovider/llms-full.txt). [Give Your Own Ribbon Buttons Sharp Icons](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/#give-your-own-ribbon-buttons-sharp-icons) shows the code.

### Related Pages

- [High DPI and Display Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/integration/dpi-scaling/llms-full.txt): set up DPI awareness in a new application.
- [Ribbon, Toolbars, Rulers, and Status Bar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/ribbon-toolbars/llms-full.txt): the components that scale with the editor.
- [Fonts and Document Layout](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/fonts/llms-full.txt): text that looks different for other reasons.

---

## Nearby

- **Previous:** [Fonts and Document Layout](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/fonts/llms-full.txt)
- **Next:** [Printing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/printing/llms-full.txt)
