Udostępnij za pośrednictwem


DpiAwareness.DeviceToLogicalSize Method

Definition

Overloads

DeviceToLogicalSize(IntPtr, Size)

Converts a Size from device units to logical units.

DeviceToLogicalSize(IntPtr, Size)

Converts a Size from device units to logical units.

DeviceToLogicalSize(Control, Size)

Converts a Size from device units to logical units.

DeviceToLogicalSize(Visual, Size)

Converts a Size from device units to logical units.

DeviceToLogicalSize(IntPtr, Size)

Converts a Size from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Drawing::Size DeviceToLogicalSize(IntPtr hwnd, System::Drawing::Size size);
public static System.Drawing.Size DeviceToLogicalSize (this IntPtr hwnd, System.Drawing.Size size);
static member DeviceToLogicalSize : nativeint * System.Drawing.Size -> System.Drawing.Size
<Extension()>
Public Function DeviceToLogicalSize (hwnd As IntPtr, size As Size) As Size

Parameters

hwnd
IntPtr

nativeint

The IntPtr of the window with which to convert the given Size.

size
Size

The Size to convert.

Returns

A new Size in logical units.

Applies to

DeviceToLogicalSize(IntPtr, Size)

Converts a Size from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Size DeviceToLogicalSize(IntPtr hwnd, System::Windows::Size size);
public static System.Windows.Size DeviceToLogicalSize (this IntPtr hwnd, System.Windows.Size size);
static member DeviceToLogicalSize : nativeint * System.Windows.Size -> System.Windows.Size
<Extension()>
Public Function DeviceToLogicalSize (hwnd As IntPtr, size As Size) As Size

Parameters

hwnd
IntPtr

nativeint

The IntPtr of the window with which to convert the given Size.

size
Size

The Size to convert.

Returns

A new Size in logical units.

Applies to

DeviceToLogicalSize(Control, Size)

Converts a Size from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Drawing::Size DeviceToLogicalSize(System::Windows::Forms::Control ^ control, System::Drawing::Size size);
public static System.Drawing.Size DeviceToLogicalSize (this System.Windows.Forms.Control control, System.Drawing.Size size);
static member DeviceToLogicalSize : System.Windows.Forms.Control * System.Drawing.Size -> System.Drawing.Size
<Extension()>
Public Function DeviceToLogicalSize (control As Control, size As Size) As Size

Parameters

control
Control

The Control with which to convert the given Size.

size
Size

The Size to convert.

Returns

A new Size in logical units.

Applies to

DeviceToLogicalSize(Visual, Size)

Converts a Size from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Windows::Size DeviceToLogicalSize(System::Windows::Media::Visual ^ visual, System::Windows::Size size);
public static System.Windows.Size DeviceToLogicalSize (this System.Windows.Media.Visual visual, System.Windows.Size size);
static member DeviceToLogicalSize : System.Windows.Media.Visual * System.Windows.Size -> System.Windows.Size
<Extension()>
Public Function DeviceToLogicalSize (visual As Visual, size As Size) As Size

Parameters

visual
Visual

The Visual with which to convert the given Size.

size
Size

The Size to convert.

Returns

A new Size in logical units.

Applies to