public void GetWindowRectangle(out int x, out int y, out int width, out int height)
        {
            var rect = new Win32Rectangle();

            Functions.GetWindowRect(this.Handle, ref rect);
            var parent = Functions.GetParent(this.Handle);

            var point = new Point(rect.Left, rect.Top);

            Functions.ScreenToClient(parent, ref point);

            x      = point.X;
            y      = point.Y;
            width  = rect.Width;
            height = rect.Height;
        }
Esempio n. 2
0
 public static extern int FillRect(IntPtr hdc, ref Win32Rectangle rect, IntPtr intPtr);
Esempio n. 3
0
 public static extern bool GetWindowRect(IntPtr hWnd, ref Win32Rectangle rect);
Esempio n. 4
0
 public static extern bool AdjustWindowRectEx(
     ref Win32Rectangle lpRect,
     WindowStyle dwStyle,
     [MarshalAs(UnmanagedType.Bool)] bool bMenu,
     ExtendedWindowStyle dwExStyle);