# High DPI and Display Scaling

> Make the TX Spell .NET dialogs scale per monitor in Windows Forms: SetHighDpiMode PerMonitorV2 on .NET, DpiAwareness in app.config on .NET Framework 4.7.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for Windows Forms > Integration Guide > High DPI and Display Scaling
- **874 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/integration/dpi-scaling/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/integration/dpi-scaling/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/integration/dpi-scaling/llms-full.txt

---

Screens with 150 or 200 percent scaling, and setups that mix a 4K monitor with a standard one, are common today. Since version 8.0, the dialogs of TX Spell .NET for Windows Forms are per-monitor DPI aware: they are drawn for the scale factor of the monitor they are on, and scale again when the user moves the application to another monitor or changes the scale factor while it runs. Whether they do this depends on one setting of your application.

### Which Dialogs Scale

Two dialogs of TX Spell .NET adapt to the display:

- the **spell check dialog**, opened with [Show](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialog/show-method/llms-full.txt) of the [SpellCheckDialog](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/spellcheckdialog-property/llms-full.txt);
- the **options dialog**, opened with [OptionsDialog](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/optionsdialog-method/llms-full.txt).

On a 4K screen, the dialog keeps its layout and stays readable:

![TX Text Control Words with the Spelling dialog twice: small on the left, and on the right scaled to a 4K display, with the misspelled word doucment and the suggestions document, documents and docent.](https://docs.textcontrol.com/assets/img/tx-spell-dotnet-winforms/spell-check-dialog-4k.88078c02.webp)

Nothing in TX Spell .NET has to be set for this. Per-monitor scaling is a mode of the whole Windows Forms application, and the application switches it on.

### Switch On Per-Monitor Scaling in .NET

In a .NET 8 or later application, call `Application.SetHighDpiMode` with `HighDpiMode.PerMonitorV2` in `Main`, before the first form is created:

```csharp
[STAThread]
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new Form1());
}
```

### Switch On Per-Monitor Scaling in .NET Framework

In the .NET Framework, starting with version 4.7, enhanced high DPI support is an opt-in feature of the *app.config* file. Add this section inside the `configuration` element:

```xml
<System.Windows.Forms.ApplicationConfigurationSection>
  <add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
```

Projects for .NET Framework 4.0 to 4.6 can't use this setting. `SetHighDpiMode`, `HighDpiMode` and `DpiAwareness` belong to Windows Forms, not to TX Spell .NET or TX Text Control.

### With TX Text Control

The same setting applies to the `TextControl`, its toolbars and ribbons, which support per-monitor DPI since TX Text Control 29.0. TX Text Control's side of display scaling, with the troubleshooting steps for blurry or wrongly sized controls, is in [DPI Scaling](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/dpi-scaling/llms-full.txt) of the TX Text Control .NET for Windows Forms documentation.

After an upgrade, check the dialogs on monitors with different scale factors, as [Breaking Changes](https://docs.textcontrol.com/tx-spell-dotnet-winforms/whats-new/breaking-changes/llms-full.txt) recommends.

### Next Steps

- [Spell Check Dialog](https://docs.textcontrol.com/tx-spell-dotnet-winforms/user-interface/spell-check-dialog/llms-full.txt): the parts and buttons of the dialog.
- [Options Dialog](https://docs.textcontrol.com/tx-spell-dotnet-winforms/user-interface/options-dialog/llms-full.txt): the settings users change themselves.
- [Version 8.0](https://docs.textcontrol.com/tx-spell-dotnet-winforms/whats-new/0800/#per-monitor-dpi-awareness): the release that introduced per-monitor DPI awareness.

---

## Nearby

- **Previous:** [TX Text Control .NET Server Document Editor](https://docs.textcontrol.com/tx-spell-dotnet-winforms/integration/document-editor/llms-full.txt)
- **Next:** [Deployment Guide](https://docs.textcontrol.com/tx-spell-dotnet-winforms/deployment/llms-full.txt)
