How can you make a picture act like a button?

  • Thread starter Thread starter Russ via AccessMonster.com
  • Start date Start date
R

Russ via AccessMonster.com

How can you make a picture act like a button?
I have a picture on my form that I would like to have act like a button when
someone clicke on it, how can this be acomplished?
 
If you mean an image control, it does have a click event, but it lacks most
of the functionality of a command button. Another option would be to create
a command button and use a picture instead of a caption.
 
checking the properties, it has a name of OLEUnbound and there is a click
event.
It was a picture I copied and pasted on the form, how cn I make it act like a
button?
Maybe go from raised to sunken when clicked???? Or something like that....
 
Yes, you could do that; however, there are no before or after update events.
If that is not a problem, then you could do that.
 
How would you do that via code? Example please.
Yes, you could do that; however, there are no before or after update events.
If that is not a problem, then you could do that.
checking the properties, it has a name of OLEUnbound and there is a click
event.
[quoted text clipped - 9 lines]
 
To make it Sunken:
Me.MyPicture.SpecialEffects = 2
To make it raised, change 2 to 1

So, since an Image control has mouse up and mouse down events put the sunken
version in the Mouse Down event and the raised version in the Mouse Up event.
Whatever code you need to run, put in the click event.
Or, you could start your click event code with the sunken version and end it
with the raised version.

Russ via AccessMonster.com said:
How would you do that via code? Example please.
Yes, you could do that; however, there are no before or after update events.
If that is not a problem, then you could do that.
checking the properties, it has a name of OLEUnbound and there is a click
event.
[quoted text clipped - 9 lines]
I have a picture on my form that I would like to have act like a button when
someone clicke on it, how can this be acomplished?
 
That is perfect, thanks!
To make it Sunken:
Me.MyPicture.SpecialEffects = 2
To make it raised, change 2 to 1

So, since an Image control has mouse up and mouse down events put the sunken
version in the Mouse Down event and the raised version in the Mouse Up event.
Whatever code you need to run, put in the click event.
Or, you could start your click event code with the sunken version and end it
with the raised version.
How would you do that via code? Example please.
[quoted text clipped - 6 lines]
 
Back
Top