Dynamically change icon on button?

M

mscertified

Is there a way to dynamically change the icon displayed on a command button.
I want the icon to change when the button is clicked. All I see in properties
is 'bitmap'. Thanks.
 
M

Marshall Barton

mscertified said:
Is there a way to dynamically change the icon displayed on a command button.
I want the icon to change when the button is clicked. All I see in properties
is 'bitmap'.

Change the Picture Type property to Linked and then set the
Picture property to the path to your icon file.
 
M

mscertified

I was intending to use the builtin icons and I have no idea where they are
stored?
 
M

Marshall Barton

Those bitmaps are hidden in some file. There are icon tools
on the web that can extract them so you can create
individual icon files or libraries, but then you're back to
what I suggested.

If you have other buttons with the other bimaps, you
might(?) be able to copy the PictureData property from one
control to another, but this seems more complicated than
doing what I said earlier. Besides, if you were going to
add other buttons with various bitmaps, it would be easier
to just make one invisible and another visible.
 
Top