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

Hiding buttons?

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
I have a load of button that I want to be invisible but still respond to clicks. If I set a button's visible propety to false it seems to act like the button doesn't exist.

Failing this, is it possible to create an image map so that if a user clicks i9n a certain area of a graphic, an event occurs.

Thanks in advance,

elziko
 
A typical approach would be to add ImageBox's instead of command buttons. They are invisible at runtime unless you have an image in them. You can place them over other pictures or controls and pickup on the click event without it being visible, but it can still be enabled. To see how this works, place an imagebox on the form and set the MousePointer=14-Pointer and Question. Then place a msgbox statement saying "Image Click" in the Click event of the ImageBox, then run the application.

You'll see that the imagebox is invisible, however when you mouse over it, the mouse pointer will change.

You may need to resize the imagebox to fit your zoning requirements. You may have to set the ZOrder of the imagebox if you need to. Snaggs
tribesaddict@swbell.net
 
One way: Instead of buttons use Images with a flat appearance and no border. Spaced together they would give an appearance of an image map.

Hope it helps, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
A label with backstyle of transparent works the same way.
David Paulson


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top