I have a puzzle all of you out there. I designed a program so the user can draw their own rectangular boundries by clicking, dragging and mouseup. I am able to grab the 4 coordinates of a rectangle that way and a draw the rectangle. However, my problem is not doing that, it is the complexity in validating to make sure no new rectangle drawn overlaps any existing rectangle. So far, I have not been able to come up with a simple function to check for that. I am storing the upper left coordinate (X1,Y1) and the lower right coordinate (X2,Y2) of the rectangles. The other 2 vertices can be determined in code very simply of course. Any ideas how to validate that? I could do it, but it will be a ton of code (there are just too many possiblities). Anything come to mind to make this validation simple? One problem I came across is that 2 rectangles can overlap without any of the 4 vertices of one rectangle being inside the other rectangle and vice versa. Also, one rectangle could be completely inside another rectangle, which poses another problem. There's got to be a mathmatical algorithm to do this or something.