DpiAwareness.DeviceToLogicalUnits Method

Definition

Overloads

DeviceToLogicalUnits(Control, Int16)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, UInt64)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, UInt32)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, Single)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, Int64)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, Int32)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, Double)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, UInt16)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, UInt32)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, UInt16)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, Single)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, Int64)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, Int32)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, UInt64)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, Int16)

Converts an value from device units to logical units.

DeviceToLogicalUnits(IntPtr, Double)

Converts an value from device units to logical units.

DeviceToLogicalUnits(Control, Int16)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static short DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, short value);
public static short DeviceToLogicalUnits (this System.Windows.Forms.Control control, short value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * int16 -> int16
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As Short) As Short

Parameters

control
Control

The Control with which to convert the given value.

value
Int16

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, UInt64)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt64 DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, System::UInt64 value);
public static ulong DeviceToLogicalUnits (this System.Windows.Forms.Control control, ulong value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * uint64 -> uint64
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As ULong) As ULong

Parameters

control
Control

The Control with which to convert the given value.

value
UInt64

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, UInt32)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt32 DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, System::UInt32 value);
public static uint DeviceToLogicalUnits (this System.Windows.Forms.Control control, uint value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * uint32 -> uint32
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As UInteger) As UInteger

Parameters

control
Control

The Control with which to convert the given value.

value
UInt32

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, Single)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static float DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, float value);
public static float DeviceToLogicalUnits (this System.Windows.Forms.Control control, float value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * single -> single
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As Single) As Single

Parameters

control
Control

The Control with which to convert the given value.

value
Single

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, Int64)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static long DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, long value);
public static long DeviceToLogicalUnits (this System.Windows.Forms.Control control, long value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * int64 -> int64
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As Long) As Long

Parameters

control
Control

The Control with which to convert the given value.

value
Int64

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, Int32)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static int DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, int value);
public static int DeviceToLogicalUnits (this System.Windows.Forms.Control control, int value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * int -> int
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As Integer) As Integer

Parameters

control
Control

The Control with which to convert the given value.

value
Int32

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, Double)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static double DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, double value);
public static double DeviceToLogicalUnits (this System.Windows.Forms.Control control, double value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * double -> double
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As Double) As Double

Parameters

control
Control

The Control with which to convert the given value.

value
Double

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(Control, UInt16)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt16 DeviceToLogicalUnits(System::Windows::Forms::Control ^ control, System::UInt16 value);
public static ushort DeviceToLogicalUnits (this System.Windows.Forms.Control control, ushort value);
static member DeviceToLogicalUnits : System.Windows.Forms.Control * uint16 -> uint16
<Extension()>
Public Function DeviceToLogicalUnits (control As Control, value As UShort) As UShort

Parameters

control
Control

The Control with which to convert the given value.

value
UInt16

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, UInt32)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt32 DeviceToLogicalUnits(IntPtr hwnd, System::UInt32 value);
public static uint DeviceToLogicalUnits (this IntPtr hwnd, uint value);
static member DeviceToLogicalUnits : nativeint * uint32 -> uint32
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As UInteger) As UInteger

Parameters

hwnd
IntPtr

nativeint

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

value
UInt32

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, UInt16)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt16 DeviceToLogicalUnits(IntPtr hwnd, System::UInt16 value);
public static ushort DeviceToLogicalUnits (this IntPtr hwnd, ushort value);
static member DeviceToLogicalUnits : nativeint * uint16 -> uint16
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As UShort) As UShort

Parameters

hwnd
IntPtr

nativeint

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

value
UInt16

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, Single)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static float DeviceToLogicalUnits(IntPtr hwnd, float value);
public static float DeviceToLogicalUnits (this IntPtr hwnd, float value);
static member DeviceToLogicalUnits : nativeint * single -> single
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As Single) As Single

Parameters

hwnd
IntPtr

nativeint

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

value
Single

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, Int64)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static long DeviceToLogicalUnits(IntPtr hwnd, long value);
public static long DeviceToLogicalUnits (this IntPtr hwnd, long value);
static member DeviceToLogicalUnits : nativeint * int64 -> int64
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As Long) As Long

Parameters

hwnd
IntPtr

nativeint

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

value
Int64

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, Int32)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static int DeviceToLogicalUnits(IntPtr hwnd, int value);
public static int DeviceToLogicalUnits (this IntPtr hwnd, int value);
static member DeviceToLogicalUnits : nativeint * int -> int
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As Integer) As Integer

Parameters

hwnd
IntPtr

nativeint

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

value
Int32

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, UInt64)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static System::UInt64 DeviceToLogicalUnits(IntPtr hwnd, System::UInt64 value);
public static ulong DeviceToLogicalUnits (this IntPtr hwnd, ulong value);
static member DeviceToLogicalUnits : nativeint * uint64 -> uint64
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As ULong) As ULong

Parameters

hwnd
IntPtr

nativeint

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

value
UInt64

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, Int16)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static short DeviceToLogicalUnits(IntPtr hwnd, short value);
public static short DeviceToLogicalUnits (this IntPtr hwnd, short value);
static member DeviceToLogicalUnits : nativeint * int16 -> int16
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As Short) As Short

Parameters

hwnd
IntPtr

nativeint

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

value
Int16

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to

DeviceToLogicalUnits(IntPtr, Double)

Converts an value from device units to logical units.

public:
[System::Runtime::CompilerServices::Extension]
 static double DeviceToLogicalUnits(IntPtr hwnd, double value);
public static double DeviceToLogicalUnits (this IntPtr hwnd, double value);
static member DeviceToLogicalUnits : nativeint * double -> double
<Extension()>
Public Function DeviceToLogicalUnits (hwnd As IntPtr, value As Double) As Double

Parameters

hwnd
IntPtr

nativeint

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

value
Double

The value to convert.

Returns

The value as a logical unit.

Remarks

Non-floating-point overloads will peform nearest value rounding as opposed to floor rounding because it allows for more accurate rounding-tripping of values when converting back and forth between logical and device units.

Applies to