Esempio n. 1
0
 public virtual void ClientToScreen(ref Rectangle clientRect, out Rectangle screenRect)
 {
     screenRect = clientRect;
     User32Helpers.MapWindowPoints(this.Handle, IntPtr.Zero, ref screenRect);
     User32Methods.AdjustWindowRectEx(ref screenRect, this.GetStyles(),
                                      User32Methods.GetMenu(this.Handle) != IntPtr.Zero, this.GetExStyles());
 }
Esempio n. 2
0
 public virtual void ScreenToClient(ref Rectangle screenRect, out Rectangle clientRect)
 {
     clientRect = screenRect;
     User32Helpers.MapWindowPoints(IntPtr.Zero, this.Handle, ref clientRect);
     User32Helpers.InverseAdjustWindowRectEx(ref clientRect, this.GetStyles(),
                                             User32Methods.GetMenu(this.Handle) != IntPtr.Zero, this.GetExStyles());
 }
Esempio n. 3
0
 public virtual void GetFrameThickness(out Rectangle rect)
 {
     this.m_window.GetClientRect(out rect);
     User32Helpers.MapWindowPoints(this.m_window.Handle, IntPtr.Zero, ref rect);
     // Don't add top, since the topMargin is calculated to be in parity
     // with client area already with the Dwm frame extension
     rect.Left   += this.NcOutsetThickness.Left;
     rect.Right  += this.NcOutsetThickness.Right;
     rect.Bottom += this.NcOutsetThickness.Bottom;
 }