User32GetClientRect(IntPtr, Rectangle) Method
Retrieves the coordinates of a window's client area.
The client coordinates specify the upper-left and lower-right corners of the client area.
Because client coordinates are relative to the upper-left corner of a window's client area,
the coordinates of the upper-left corner are (0,0).
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 GetClientRect(
IntPtr hWnd,
out Rectangle refRect
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function GetClientRect (
hWnd As IntPtr,
<OutAttribute> ByRef refRect As Rectangle
) As Boolean
Dim hWnd As IntPtr
Dim refRect As Rectangle
Dim returnValue As Boolean
returnValue = User32.GetClientRect(hWnd,
refRect)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool GetClientRect(
IntPtr hWnd,
[InAttribute] [OutAttribute] Rectangle% refRect
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member GetClientRect :
hWnd : IntPtr *
refRect : Rectangle byref -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A handle to the window whose client coordinates are to be retrieved.
- refRect Rectangle
-
A pointer to a Rectangle structure that receives the client coordinates.
The left and top members are zero. The right and bottom members contain the width and height of the window.
Boolean if the function succeeds,
otherwise.