|
-
Nov 24th, 2007, 06:50 PM
#6
Re: [2005] overlapping rectangles
 Originally Posted by .paul.
how can i test for overlapping rectangles?
for example:
vb.net Code:
rectangle1 = new rectangle(168,111,10,36)
rectangle2 = new rectangle(160,108,18,18)
these 2 rectangles overlap. any ideas?
the rectangles are actually a textbox + a picturebox
Hi,
If you I see your code then they overlapping.
rectangle1 = new rectangle(168= x,111=y,10,36= the size of your rectangle)
rectangle2 = new rectangle(160=x,111= y,18,18= the size of the other rectangle)
In code you have then:
Code:
rectangle1 = new rectangle(168,111,10,36)
rectangle2 = new rectangle(168,122,18,18)
That they will be situated under each other with there own size.
Or you can have the same size and then you do this:
Code:
rectangle1 = new rectangle(168,111,10,36)
rectangle2 = new rectangle(168,122,10,36)
Hope it helps,
sparrow1
Last edited by sparrow1; Nov 24th, 2007 at 06:55 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|