DpiAwareness.DeviceToLogicalRect 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
DeviceToLogicalRect(Visual, Rect) |
Converts a Rect from device units to logical units. |
DeviceToLogicalRect(IntPtr, Rect) |
Converts a Rect from device units to logical units. |
DeviceToLogicalRect(IntPtr, Rect) |
Converts a window's bounding rectangle from device units to logical units. |
DeviceToLogicalRect(Control, Rectangle) |
Converts a Rectangle from device units to logical units. |
DeviceToLogicalRect(IntPtr, Rectangle) |
Converts a window's bounding rectangle from device units to logical units. |
DeviceToLogicalRect(Window) | |
DeviceToLogicalRect(Control) |
Converts a ControlRectangle from device units to logical units. |
DeviceToLogicalRect(IntPtr, Rectangle) |
Converts a Rectangle from device units to logical units. |
DeviceToLogicalRect(Visual, Rect)
Converts a Rect from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static System::Windows::Rect DeviceToLogicalRect(System::Windows::Media::Visual ^ visual, System::Windows::Rect rect);
public static System.Windows.Rect DeviceToLogicalRect (this System.Windows.Media.Visual visual, System.Windows.Rect rect);
static member DeviceToLogicalRect : System.Windows.Media.Visual * System.Windows.Rect -> System.Windows.Rect
<Extension()>
Public Function DeviceToLogicalRect (visual As Visual, rect As Rect) As Rect
Parameters
Returns
A new Rect in logical units.
Applies to
DeviceToLogicalRect(IntPtr, Rect)
Converts a Rect from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static System::Windows::Rect DeviceToLogicalRect(IntPtr hwnd, System::Windows::Rect rect);
public static System.Windows.Rect DeviceToLogicalRect (this IntPtr hwnd, System.Windows.Rect rect);
static member DeviceToLogicalRect : nativeint * System.Windows.Rect -> System.Windows.Rect
<Extension()>
Public Function DeviceToLogicalRect (hwnd As IntPtr, rect As Rect) As Rect
Parameters
Returns
A new Rect in logical units.
Applies to
DeviceToLogicalRect(IntPtr, Rect)
Converts a window's bounding rectangle from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static bool DeviceToLogicalRect(IntPtr hwnd, [Runtime::InteropServices::Out] System::Windows::Rect % rect);
public static bool DeviceToLogicalRect (this IntPtr hwnd, out System.Windows.Rect rect);
static member DeviceToLogicalRect : nativeint * Rect -> bool
<Extension()>
Public Function DeviceToLogicalRect (hwnd As IntPtr, ByRef rect As Rect) As Boolean
Parameters
Returns
True if the conversion succeeded, false if it failed.
Applies to
DeviceToLogicalRect(Control, Rectangle)
Converts a Rectangle from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static System::Drawing::Rectangle DeviceToLogicalRect(System::Windows::Forms::Control ^ control, System::Drawing::Rectangle rect);
public static System.Drawing.Rectangle DeviceToLogicalRect (this System.Windows.Forms.Control control, System.Drawing.Rectangle rect);
static member DeviceToLogicalRect : System.Windows.Forms.Control * System.Drawing.Rectangle -> System.Drawing.Rectangle
<Extension()>
Public Function DeviceToLogicalRect (control As Control, rect As Rectangle) As Rectangle
Parameters
Returns
A new Rectangle in logical units.
Applies to
DeviceToLogicalRect(IntPtr, Rectangle)
Converts a window's bounding rectangle from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static bool DeviceToLogicalRect(IntPtr hwnd, [Runtime::InteropServices::Out] System::Drawing::Rectangle % rect);
public static bool DeviceToLogicalRect (this IntPtr hwnd, out System.Drawing.Rectangle rect);
static member DeviceToLogicalRect : nativeint * Rectangle -> bool
<Extension()>
Public Function DeviceToLogicalRect (hwnd As IntPtr, ByRef rect As Rectangle) As Boolean
Parameters
Returns
True if the conversion succeeded, false if it failed.
Applies to
DeviceToLogicalRect(Window)
public:
[System::Runtime::CompilerServices::Extension]
static System::Windows::Rect DeviceToLogicalRect(System::Windows::Window ^ window);
public static System.Windows.Rect DeviceToLogicalRect (this System.Windows.Window window);
static member DeviceToLogicalRect : System.Windows.Window -> System.Windows.Rect
<Extension()>
Public Function DeviceToLogicalRect (window As Window) As Rect
Parameters
Returns
A new Rect in logical units.
Applies to
DeviceToLogicalRect(Control)
public:
[System::Runtime::CompilerServices::Extension]
static System::Drawing::Rectangle DeviceToLogicalRect(System::Windows::Forms::Control ^ control);
public static System.Drawing.Rectangle DeviceToLogicalRect (this System.Windows.Forms.Control control);
static member DeviceToLogicalRect : System.Windows.Forms.Control -> System.Drawing.Rectangle
<Extension()>
Public Function DeviceToLogicalRect (control As Control) As Rectangle
Parameters
Returns
A new Rectangle in logical units.
Applies to
DeviceToLogicalRect(IntPtr, Rectangle)
Converts a Rectangle from device units to logical units.
public:
[System::Runtime::CompilerServices::Extension]
static System::Drawing::Rectangle DeviceToLogicalRect(IntPtr hwnd, System::Drawing::Rectangle rect);
public static System.Drawing.Rectangle DeviceToLogicalRect (this IntPtr hwnd, System.Drawing.Rectangle rect);
static member DeviceToLogicalRect : nativeint * System.Drawing.Rectangle -> System.Drawing.Rectangle
<Extension()>
Public Function DeviceToLogicalRect (hwnd As IntPtr, rect As Rectangle) As Rectangle
Parameters
Returns
A new Rectangle in logical units.