How do i make something happen if two pictures touch (a collision). PicA touches PicB then msg("The Pictures touched...lol") how would this be possible?
Printable View
How do i make something happen if two pictures touch (a collision). PicA touches PicB then msg("The Pictures touched...lol") how would this be possible?
There is no event like that. Rectangles have a method called IntersectsWith, which returns true if two rectangles intersects with eachother. Every control has a Bounds property, that returns a Rectangle. Thats all you need to know ;)
Thankyou so would that mean i can type somethine like
if PicA.IntersectsWith = true then
'whatever
end if
or is it if PicA.intersectsWith(PicB) = true then
'whatver
end if
how do you determane what it intersects with. I can probally just check my self try both ways but this saves time lol
I assume that PicA and PicB are pictureboxes? Have you checked their Bounds properties? Use what they return.
ok...Thankyou for your help