Page 1 of 1

Image hover.. something like that

Posted: Sun Apr 25, 2010 10:15 am
by Lewis
Image
All in the image...

EDIT: If this isnt possible i do have other ways..

Re: Image hover.. something like that

Posted: Sun Apr 25, 2010 2:59 pm
by CodenStuff
Hello,

Picturebox does have a function you can use for this, im not sure why it was included in VB because I cant see any other use for it apart from in games but anyway lol. Its a great way of detecting "Collisions" between pictureboxes and the function is "IntersectsWith".

Say for example your "Player" is PictureBox1 and your "Enemy" is PictureBox2 and you wanted to do something when your player hit your enemy you could use:
Code: Select all
If PictureBox1.Bounds.IntersectsWith(PictureBox2.Bounds) Then
'Do something here
End If
I hope that helps cooll;

Re: Image hover.. something like that

Posted: Sun Apr 25, 2010 7:45 pm
by Lewis
Thankyou so much codenstuff.. Worked :)