Form.OnGetDpiScaledSize(Int32, Int32, Size) Form.OnGetDpiScaledSize(Int32, Int32, Size) Form.OnGetDpiScaledSize(Int32, Int32, Size) Form.OnGetDpiScaledSize(Int32, Int32, Size) Method

定义

引发 GetDpiScaledSize 事件。Raises the GetDpiScaledSize event.

protected:
 virtual bool OnGetDpiScaledSize(int deviceDpiOld, int deviceDpiNew, System::Drawing::Size % desiredSize);
[System.ComponentModel.Browsable(true)]
protected virtual bool OnGetDpiScaledSize (int deviceDpiOld, int deviceDpiNew, ref System.Drawing.Size desiredSize);
abstract member OnGetDpiScaledSize : int * int * Size -> bool
override this.OnGetDpiScaledSize : int * int * Size -> bool
Protected Overridable Function OnGetDpiScaledSize (deviceDpiOld As Integer, deviceDpiNew As Integer, ByRef desiredSize As Size) As Boolean

参数

deviceDpiOld
Int32 Int32 Int32 Int32

以前显示窗体的显示设备的 DPI 值。The DPI value for the display device where the form was previously displayed.

deviceDpiNew
Int32 Int32 Int32 Int32

将显示窗体的显示设备的 DPI 值。The DPI value for the display device where the form will be displayed.

desiredSize
Size Size Size Size

表示基于新 DPI 值的窗体的新大小的 SizeA Size representing the new size of the form based on the new DPI value.

返回

如果成功,则为 true;否则为 falsetrue if successful; otherwise false.

适用于