|
-
Mar 15th, 2008, 08:19 AM
#1
Thread Starter
Frenzied Member
[2005] collision event
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?
-
Mar 15th, 2008, 08:22 AM
#2
Re: [2005] collision event
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
-
Mar 15th, 2008, 08:33 AM
#3
Thread Starter
Frenzied Member
Re: [2005] collision event
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
-
Mar 15th, 2008, 08:35 AM
#4
Re: [2005] collision event
I assume that PicA and PicB are pictureboxes? Have you checked their Bounds properties? Use what they return.
-
Mar 15th, 2008, 09:05 AM
#5
Thread Starter
Frenzied Member
Re: [2005] collision event
ok...Thankyou for your help
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
|