Пример #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;
 }
Пример #3
0
 static extern bool GetWindowRect(int hWnd, out RECT lpRect);
Пример #4
0
 private static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
Пример #5
0
 static extern bool GetClientRect(IntPtr hWnd, ref RECT rect);
Пример #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;
 }
Пример #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;
 }
Пример #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);
Пример #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));
        }
Пример #11
0
 public static extern long GetWindowRect(IntPtr hWnd, ref RECT lpRect);
Пример #12
0
 public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
Пример #13
0
 private static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);