Control.LogicalToDeviceUnits Method

Definition

Overloads

LogicalToDeviceUnits(Int32)

Converts a Logical DPI value to its equivalent DeviceUnit DPI value.

LogicalToDeviceUnits(Size)

Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height.

LogicalToDeviceUnits(Int32)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs

Converts a Logical DPI value to its equivalent DeviceUnit DPI value.

public int LogicalToDeviceUnits (int value);

Parameters

value
Int32

The Logical value to convert.

Returns

The resulting DeviceUnit value.

Applies to

.NET Framework 4.8.1 and other versions
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

LogicalToDeviceUnits(Size)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs

Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height.

public System.Drawing.Size LogicalToDeviceUnits (System.Drawing.Size value);

Parameters

value
Size

The size to be scaled.

Returns

The scaled size.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9