Set High Dpi Mode(HighDpiMode) Method
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
One of the enumeration values that specifies the high DPI mode to set.
true if the high DPI mode was set; otherwise,
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.