Application.SetHighDpiMode(HighDpiMode) Method

Definition

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