WindowsFormsSettings.SetDPIAware() - enables System DPI awareness mode.To make your WinForms DevExpress-based application DPI-aware, open the Project Settings Page and choose the required awareness mode.Īlternatively, call the following methods on application startup:
#Visual basic power pack resize shape how to#
How to Enable DPI Awareness in DevExpress Applications Microsoft recommends that you always use Per-Monitor V2.
#Visual basic power pack resize shape update#
The first Per-Monitor mode was introduced in Windows 8.1, with the V2 iteration replacing it in Windows 10 Creators Update (build 1703). The app itself renders the rest of the application - as a developer, you need to track system WM_DPICHANGED messages, obtain the current display DPI, and resize/realign controls depending on this value. In Per-Monitor modes, Windows bitmap-scales only images and non-client areas. As a result, an app looks crisp on any display. These modes allow applications to dynamically adapt to displays with different DPIs. This means that applications remain sharp with one DPI factor only, and become blurry on devices with different DPI factors. When shown on displays with different DPI values, Windows bitmap-scales such applications. In this mode, applications are rendered according to the DPI of a display, which was the primary display when the user session started.
![visual basic power pack resize shape visual basic power pack resize shape](https://csharpcorner-mindcrackerinc.netdna-ssl.com/UploadFile/scottlysle/power-pack-drawing-primitives-for-VB-Net/Images/Power-pack-drawing-primitive3-in-VB.NET.gif)
This mode was introduced in Windows Vista. Any WinForms application you create is initially DPI-unaware. This keeps the application layout intact at the cost of quality - blurry images, fuzzy captions, thick separator lines and borders, etc. When shown on a High-DPI device, every element of an application is rendered with its original size and then bitmap-stretched to match the screen DPI. In this mode, applications assume that all displays have the default 96 DPI (100%) scaling. This mode works on all Windows versions prior to Windows Vista. The DPI Awareness Mode specifies the way an application is displayed when shown on a high resolution screen.
![visual basic power pack resize shape visual basic power pack resize shape](https://img.informer.com/p0/MVBPP-v3-main-window-outlook.png)
![visual basic power pack resize shape visual basic power pack resize shape](https://code.visualstudio.com/assets/updates/1_59/extension-details.png)
This article explains how to develop DevExpress-based applications that can be viewed on high DPI devices without loss of quality.