Exemplo n.º 1
0
 public RECT(RECT rcSrc)
 {
     this.left = rcSrc.left;
     this.top = rcSrc.top;
     this.right = rcSrc.right;
     this.bottom = rcSrc.bottom;
 }
 public bool Equals(RECT r)
 {
     return r.Left == Left && r.Top == Top && r.Right == Right && r.Bottom == Bottom;
 }
Exemplo n.º 3
0
 static extern bool GetWindowRect(int hWnd, out RECT lpRect);
Exemplo n.º 4
0
 private static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
Exemplo n.º 5
0
 static extern bool GetClientRect(IntPtr hWnd, ref RECT rect);
Exemplo n.º 6
0
 /// <summary>
 /// Gets the Console Window location and size in pixels
 /// </summary>
 public void GetWindowPosition(out int x, out int y, out int width, out int height)
 {
     RECT rect = new RECT();
     GetClientRect(Handle, ref rect);
     x = rect.top;
     y = rect.left;
     width = rect.right - rect.left;
     height = rect.bottom - rect.top;
 }
Exemplo n.º 7
0
 public RECT(RECT rcSrc)
 {
     m_left = rcSrc.m_left;
     m_top = rcSrc.m_top;
     m_right = rcSrc.m_right;
     m_bottom = rcSrc.m_bottom;
 }
Exemplo n.º 8
0
 public MONITORINFO()
 {
     m_cbSize = Marshal.SizeOf(typeof(MONITORINFO));
     m_rcMonitor = new RECT();
     m_rcWork = new RECT();
     m_dwFlags = 0;
 }
 public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, ref RECT rect);
Exemplo n.º 10
0
        private void MoveSelfToForeground()
        {
            IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;
            RECT chromeRect = new RECT();
            GetWindowRect(this.ChromeProcess.MainWindowHandle, ref chromeRect);
            RECT nCorderRect = new RECT();
            GetWindowRect(handle, ref nCorderRect);

            int newX = 20;
            int newY = chromeRect.bottom - (nCorderRect.bottom - nCorderRect.top) - 20;
            SetWindowPos(handle, new IntPtr(-1), newX, newY, 0, 0, (0x0001));
        }
Exemplo n.º 11
0
 public static extern long GetWindowRect(IntPtr hWnd, ref RECT lpRect);
Exemplo n.º 12
0
 public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
Exemplo n.º 13
0
 private static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);