User32GetWindowRect(IntPtr, NativeRectangle) Method
Retrieves the dimensions of the bounding rectangle of the specified window.
The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool GetWindowRect(
IntPtr hWnd,
out NativeRectangle refRect
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function GetWindowRect (
hWnd As IntPtr,
<OutAttribute> ByRef refRect As NativeRectangle
) As Boolean
Dim hWnd As IntPtr
Dim refRect As NativeRectangle
Dim returnValue As Boolean
returnValue = User32.GetWindowRect(hWnd,
refRect)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool GetWindowRect(
IntPtr hWnd,
[OutAttribute] NativeRectangle% refRect
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member GetWindowRect :
hWnd : IntPtr *
refRect : NativeRectangle byref -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A IntPtr handle to the window.
- refRect NativeRectangle
-
A pointer to a NativeRectangle structure that receives the screen coordinates of the
upper-left and lower-right corners of the window.
Boolean if the function succeeds,
otherwise.