Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want an image as a button with a rollover .. what to use? 1

Status
Not open for further replies.

JaeBrett

Programmer
May 5, 2003
196
CN
I have a JPG image that I want to use as a button, but I have another JPG I want to use as it's mouseover. Right now I am using the Image control but it doesn't appear to have a MouseOver associated with it. Anyone have some ideas?
 
Search some of the code repository sites ( They may have what you are looking for. Also search google for the LaVolpe Button control. It has a lot of mouseover functions but I can't remember if it uses images or just fonts. I also can't find my link for it.

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = LoadPicture("e:\program files\devstudio\vb\graphics\icons\traffic\trffc10a.ico")
End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = LoadPicture("e:\program files\devstudio\vb\graphics\icons\traffic\trffc10b.ico")
End Sub
 
Perfect ... Now, MouseOver allows me to switch to my "over" image, but now how will I know when the user leaves the Image area so I can switch back to my "off" image.

Thanks again!!!
 
That's what the Form_MouseMove is supposed to do! The problem is that a fast moving mouse may miss one (or both) of the events

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top