DpiAwareness.LogicalToDeviceUnits Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
LogicalToDeviceUnits(Control, Int32) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, UInt64) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, UInt32) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, UInt16) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, Single) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, Int64) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, Int16) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, Double) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, UInt32) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, UInt16) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, Single) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, Int64) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, Int32) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, Int16) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, Double) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(IntPtr, UInt64) |
Converts an value from logical units to device units. |
LogicalToDeviceUnits(Control, Int32)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static int LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, int value);
public static int LogicalToDeviceUnits (this System.Windows.Forms.Control control, int value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * int -> int
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, UInt64)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt64 LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, System::UInt64 value);
public static ulong LogicalToDeviceUnits (this System.Windows.Forms.Control control, ulong value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * uint64 -> uint64
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, UInt32)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt32 LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, System::UInt32 value);
public static uint LogicalToDeviceUnits (this System.Windows.Forms.Control control, uint value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * uint32 -> uint32
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, UInt16)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt16 LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, System::UInt16 value);
public static ushort LogicalToDeviceUnits (this System.Windows.Forms.Control control, ushort value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * uint16 -> uint16
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, Single)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static float LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, float value);
public static float LogicalToDeviceUnits (this System.Windows.Forms.Control control, float value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * single -> single
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, Int64)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static long LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, long value);
public static long LogicalToDeviceUnits (this System.Windows.Forms.Control control, long value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * int64 -> int64
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, Int16)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static short LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, short value);
public static short LogicalToDeviceUnits (this System.Windows.Forms.Control control, short value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * int16 -> int16
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(Control, Double)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static double LogicalToDeviceUnits(System::Windows::Forms::Control ^ control, double value);
public static double LogicalToDeviceUnits (this System.Windows.Forms.Control control, double value);
static member LogicalToDeviceUnits : System.Windows.Forms.Control * double -> double
<Extension()>
Public Function LogicalToDeviceUnits (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 device 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
LogicalToDeviceUnits(IntPtr, UInt32)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt32 LogicalToDeviceUnits(IntPtr hwnd, System::UInt32 value);
public static uint LogicalToDeviceUnits (this IntPtr hwnd, uint value);
static member LogicalToDeviceUnits : nativeint * uint32 -> uint32
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As UInteger) As UInteger
Parameters
- value
- UInt32
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, UInt16)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt16 LogicalToDeviceUnits(IntPtr hwnd, System::UInt16 value);
public static ushort LogicalToDeviceUnits (this IntPtr hwnd, ushort value);
static member LogicalToDeviceUnits : nativeint * uint16 -> uint16
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As UShort) As UShort
Parameters
- value
- UInt16
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, Single)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static float LogicalToDeviceUnits(IntPtr hwnd, float value);
public static float LogicalToDeviceUnits (this IntPtr hwnd, float value);
static member LogicalToDeviceUnits : nativeint * single -> single
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As Single) As Single
Parameters
- value
- Single
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, Int64)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static long LogicalToDeviceUnits(IntPtr hwnd, long value);
public static long LogicalToDeviceUnits (this IntPtr hwnd, long value);
static member LogicalToDeviceUnits : nativeint * int64 -> int64
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As Long) As Long
Parameters
- value
- Int64
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, Int32)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static int LogicalToDeviceUnits(IntPtr hwnd, int value);
public static int LogicalToDeviceUnits (this IntPtr hwnd, int value);
static member LogicalToDeviceUnits : nativeint * int -> int
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As Integer) As Integer
Parameters
- value
- Int32
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, Int16)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static short LogicalToDeviceUnits(IntPtr hwnd, short value);
public static short LogicalToDeviceUnits (this IntPtr hwnd, short value);
static member LogicalToDeviceUnits : nativeint * int16 -> int16
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As Short) As Short
Parameters
- value
- Int16
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, Double)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static double LogicalToDeviceUnits(IntPtr hwnd, double value);
public static double LogicalToDeviceUnits (this IntPtr hwnd, double value);
static member LogicalToDeviceUnits : nativeint * double -> double
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As Double) As Double
Parameters
- value
- Double
The value to convert.
Returns
The value as a device 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
LogicalToDeviceUnits(IntPtr, UInt64)
Converts an value from logical units to device units.
public:
[System::Runtime::CompilerServices::Extension]
static System::UInt64 LogicalToDeviceUnits(IntPtr hwnd, System::UInt64 value);
public static ulong LogicalToDeviceUnits (this IntPtr hwnd, ulong value);
static member LogicalToDeviceUnits : nativeint * uint64 -> uint64
<Extension()>
Public Function LogicalToDeviceUnits (hwnd As IntPtr, value As ULong) As ULong
Parameters
- value
- UInt64
The value to convert.
Returns
The value as a device 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.