MoveWindow() private méthode

private MoveWindow ( IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint ) : bool
hWnd System.IntPtr
X int
Y int
nWidth int
nHeight int
bRepaint bool
Résultat bool
Exemple #1
0
        private void TestMoveWindow(AutomationElement listWindow, int xOffset, int yOffset)
        {
            var hwndList = (IntPtr)(int)(listWindow.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty));
            var listRect = (Rect)listWindow.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty);

            Debug.Print("Moving from {0}, {1}", listRect.X, listRect.Y);
            Win32Helper.MoveWindow(hwndList, (int)listRect.X - xOffset, (int)listRect.Y - yOffset, (int)listRect.Width, 2 * (int)listRect.Height, true);
        }