Partilhar via


DpiAwareness.DeviceToLogicalRect Method

Definition

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)

Converts a WindowRect from device units to logical units.

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

visual
Visual

The Visual with which to convert the given Rect.

rect
Rect

The Rect to convert.

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

hwnd
IntPtr

nativeint

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

rect
Rect

The Rect to convert.

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

hwnd
IntPtr

nativeint

The IntPtr of the window whose bounding rectangle to convert.

rect
Rect

The Rect in logical units.

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

control
Control

The Control with which to convert the given Rectangle.

rect
Rectangle

The Rectangle to convert.

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

hwnd
IntPtr

nativeint

The IntPtr of the window whose bounding rectangle to convert.

rect
Rectangle

The Rectangle in logical units.

Returns

True if the conversion succeeded, false if it failed.

Applies to

DeviceToLogicalRect(Window)

Converts a WindowRect from device units to logical units.

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

window
Window

The Window whose bounding Rect to convert.

Returns

A new Rect in logical units.

Applies to

DeviceToLogicalRect(Control)

Converts a ControlRectangle from device units to logical units.

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

control
Control

The Control whose bounding Rectangle to convert.

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

hwnd
IntPtr

nativeint

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

rect
Rectangle

The Rectangle to convert.

Returns

A new Rectangle in logical units.

Applies to