Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Application.SetHighDpiMode(HighDpiMode) Method

Definition

Namespace:
System.Windows.Forms
Assembly:
System.Windows.Forms.dll
Source:
Application.cs
Source:
Application.cs
Source:
Application.cs
Source:
Application.cs
Source:
Application.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Sets the high DPI mode of the process.

public:
 static bool SetHighDpiMode(System::Windows::Forms::HighDpiMode highDpiMode);
public static bool SetHighDpiMode(System.Windows.Forms.HighDpiMode highDpiMode);
static member SetHighDpiMode : System.Windows.Forms.HighDpiMode -> bool
Public Shared Function SetHighDpiMode (highDpiMode As HighDpiMode) As Boolean

Parameters

highDpiMode
HighDpiMode

One of the enumeration values that specifies the high DPI mode to set.

Returns

true if the high DPI mode was set; otherwise, false.

Remarks

If an application carries an application manifest file and the DPI mode was set in that file, this method will fail to set or change the mode that was already set by the application manifest. The high DPI mode is set once per process. For more information about setting the DPI mode via the application manifest file, see Setting the default DPI awareness for a process.

Applies to


Feedback

Was this page helpful?