How to have a "OnMouseOver" in VB like in html ?
Thanx your help :)
Printable View
How to have a "OnMouseOver" in VB like in html ?
Thanx your help :)
It's the MouseMove event
OK, but you have to make a MouseMove for the form to restore the image, is that right or is there an other way to do that ?
Thanx
Restore what Image? If you what you're trying to do is make Images appear if the Mouse is over a certian Image, you can use this code.
Code:Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Make the other images INVISIBLE when the Mouse moves on the Form
MyOtherImages.Visible = False
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Make the other images VISIBLE when the Mouse moves on this Image
MyOtherImages.Visible = True
End Sub
'example
'add a lable called label 1 to a form
'paste this in the general declarations
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.BackColor = vbRed
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.BackColor = vbBlack
End Sub