Form.OnGetDpiScaledSize(Int32, Int32, Size) Method

Definition

Raises the GetDpiScaledSize event.

C#
[System.ComponentModel.Browsable(true)]
protected virtual bool OnGetDpiScaledSize(int deviceDpiOld, int deviceDpiNew, ref System.Drawing.Size desiredSize);

Parameters

deviceDpiOld
Int32

The DPI value for the display device where the form was previously displayed.

deviceDpiNew
Int32

The DPI value for the display device where the form will be displayed.

desiredSize
Size

A Size representing the new size of the form based on the new DPI value.

Returns

true if successful; otherwise false.

Attributes

Applies to

Product Versions
.NET Framework 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10