System.Windows.Forms.Control.RectangleToScreen C# (CSharp) Method

RectangleToScreen() public method

public RectangleToScreen ( Rectangle r ) : Rectangle
r Rectangle
return Rectangle
		public Rectangle RectangleToScreen(Rectangle r) {
			return new Rectangle(PointToScreen(r.Location), r.Size);
		}

Usage Example

Example #1
1
 public static Control FindTopControl(Control parent, Point screen_pt)
 {
     Control c = parent.GetChildAtPoint(parent.PointToClient(screen_pt));
     if (c == null) {
         if (parent.RectangleToScreen(new Rectangle(0, 0, parent.Width, parent.Height)).Contains(screen_pt))
             return parent;
         else
             return null;
     }
     else
         return FindTopControl(c, screen_pt);
 }
All Usage Examples Of System.Windows.Forms.Control::RectangleToScreen
Control