Example #1
0
 /// <summary>
 /// Converts Rectangle to RECT
 /// </summary>
 public static USER32.RECT ToRECT(Rectangle r)
 {
     USER32.RECT rect = new USER32.RECT();
     rect.Top    = r.Top;
     rect.Right  = r.Right;
     rect.Bottom = r.Bottom;
     rect.Left   = r.Left;
     return(rect);
 }
Example #2
0
 /// <summary>
 /// Converts Rectangle to RECT
 /// </summary>        
 public static USER32.RECT ToRECT(Rectangle r)
 {
     USER32.RECT rect = new USER32.RECT();
     rect.Top = r.Top;
     rect.Right = r.Right;
     rect.Bottom = r.Bottom;
     rect.Left = r.Left;
     return rect;
 }
Example #3
0
 /// <summary>
 /// Converts RECT to Rectangle
 /// </summary>
 public static Rectangle ToRectangle(USER32.RECT r)
 {
     return(new Rectangle(r.Left, r.Top, r.Right - r.Left, r.Bottom - r.Top));
 }