Results 1 to 5 of 5

Thread: [2005] collision event

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    [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?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    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

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2005] collision event

    I assume that PicA and PicB are pictureboxes? Have you checked their Bounds properties? Use what they return.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    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
  •  



Click Here to Expand Forum to Full Width