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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make image transparent with mouse over

Status
Not open for further replies.

Quan9r

Technical User
May 18, 2000
36
0
0
US
I have two images one on layer on top of another -
I would like to make the top image transparent when either the moues slides over the image or when "click". Any ideas? Thank You!
 
Hi Quan9r,

You need to use the 'on mouse move' event of the control on your form. I use this quite frequently to change the colours of backgrounds of fields as the mouse glides over a form. Try something along the lines of setting an on mouse move event of the control to be imagename.visible=true and set the mouse move event of the surrounding background as imagename.visible=false. Then set the visible property of the control to false (in the properties tab, not in the vb code). When you open the form, the image will be invisible (as set by its property), when the mouse moves over the general background or any other controls, the image stays invisible, but when the mouse passes over the image it will appear, and then disappear as you move away again.

This might not be exactly the effect you want to create but if you can do this then you will have the ability to create a variety of effects with your controls. Use it for fore and back colours also to make backgrounds of text boxes or text colours alter as the mouse passes over them.

Hope this helps, jobo123





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top