User32MoveWindow(SafeHandle, Int32, Int32, Int32, Int32, Boolean) Method
Changes the position and dimensions of the specified window.
For a top-level window, the position and dimensions are relative to the upper-left corner of the screen.
For a child window, they are relative to the upper-left corner of the parent window's client area.
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 MoveWindow(
SafeHandle hWnd,
int x,
int y,
int width,
int height,
bool repaint
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function MoveWindow (
hWnd As SafeHandle,
x As Integer,
y As Integer,
width As Integer,
height As Integer,
repaint As Boolean
) As Boolean
Dim hWnd As SafeHandle
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
Dim repaint As Boolean
Dim returnValue As Boolean
returnValue = User32.MoveWindow(hWnd,
x, y, width, height, repaint)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool MoveWindow(
SafeHandle^ hWnd,
int x,
int y,
int width,
int height,
bool repaint
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member MoveWindow :
hWnd : SafeHandle *
x : int *
y : int *
width : int *
height : int *
repaint : bool -> bool
No code example is currently available or this language may not be supported.
- hWnd SafeHandle
-
A handle to the window.
- x Int32
-
The new position of the left side of the window.
- y Int32
-
The new position of the top of the window.
- width Int32
-
The new width of the window.
- height Int32
-
The new height of the window.
- repaint Boolean
-
Indicates whether the window is to be repainted.
If this parameter is , the window receives a message.
If the parameter is , no repainting of any kind occurs.
This applies to the client area, the nonclient area (including the title bar and scroll bars),
and any part of the parent window uncovered as a result of moving a child window.
Boolean if the function succeeds,
otherwise.