Setting your display scaling to 100% may be undesirable, because it can make the user interface too small to be usable. In the Settings window, set Change the size of text, apps, and other items to 100%.
To set your display scaling setting to 100% in Windows 10, type display settings in the task bar search box, and then select Change display settings. Visual Studio remains in DPI-unaware mode until you remove the registry entry. C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe.C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe.C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe.Open Registry Editor and add an entry to the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers subkey:Įntry: Depending on whether you're using Visual Studio 2017, 2019, or 2022, use one of these values: You can mark Visual Studio as DPI-unaware by modifying the registry. You can also select the Restart Visual Studio as a DPI-aware process option in the informational bar. If you close and reopen Visual Studio when it's running in DPI-unaware mode, it becomes DPI-aware again. When it's running as a DPI-unaware process, fonts can look blurry and you may see issues in other designers such as the XAML Designer. It's important to restart Visual Studio as a DPI-aware process when you're finished working in the Windows Forms Designer.
However, you can open the project by selecting it under File > Recent Projects and Solutions. If you use the default Visual Basic profile, or if you have the Save new projects when created option deselected in Tools > Options > Projects and Solutions, Visual Studio cannot reopen your project when it restarts as a DPI-unaware process.If you had undocked tool windows in Visual Studio when you selected the option to restart as a DPI-unaware process, the position of those tool windows may change.This might cause rendering problems in the designer window. The message reads Scaling on your main display is set to 200% (192 dpi). When you open a form in the Windows Forms Designer in Visual Studio on an HDPI monitor, Visual Studio displays a yellow informational bar at the top of the designer: For examples, controls can appear to overlap as shown in the following image: This causes display issues when you open some forms in the Windows Forms Designer on high dots per inch (HDPI) monitors. The Windows Forms Designer in Visual Studio doesn't have scaling support. Scaling: Windows Forms Designer on HDPI monitors Select the option to Optimize rendering for screens with different pixel densities (requires restart).The application still thinks that it's running at 100% scaling, or 96 dpi. This behavior is also called DPI virtualization. If an application states that it's not DPI-aware, the operating system scales the application as a bitmap. Visual Studio is a dots per inch (DPI) aware application, which means the display scales automatically.
In this article, you'll learn the limitations of Windows Forms Designer on HDPI monitors and how to run Visual Studio as a DPI-unaware process.