April 15th, 2011, 06:58 AM
vb6 ActiveBar 2.0 - change button image
I have an old VB6 app that uses DataDynamics' ActiveBar 2.0 for its toolbar and menus. I am adding a button to the toolbar and would like to alter the image displayed on that button based on different conditions in the program. The button is to remain active for each of three images.
I can do it by adding a normal VB6 button and assigning a resource bitmap to its Picture attribute; I cannot add the button in the screen position I would like to, because that's in the middle of other buttons put there the way ActiveBar has you do it, but it is the best solution I've found so far and I'll go to production that way if I have to. The changing of images on this button is more important than its placement, though I don't like it this way.
So what I'd like to do is find a way to load a new image onto the button within the ActiveBar toolbar. Further, I'd like to do this with an image out of a resource file, rather than out of a file on the disk. Currently the application has no files other than its executable in its install directory, and I'd like to keep it that way; the app keeps everything else it needs in a few values in the registry.
I found a post for a routine the poster called "IconToTransparent" that looks interesting but incomplete, and it uses API calls which I don't fully understand. I'm not sure where that code gets some of the values that it uses, and am not even positive that it does what I want. However, if someone reading this is familiar with that and wants to expand on it, that might be easier than starting from scratch.
I know this is an ancient control in an even more ancient language that is on its last legs. But can someone help me out?
April 16th, 2011, 11:19 PM
Re: vb6 ActiveBar 2.0 - change button image
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!