Link to home
Start Free TrialLog in
Avatar of darbid73
darbid73Flag for Germany

asked on

MS Office Command Bar button image Transparency problem


I am trying to make a pretty bmp for my MS Office commandbar button.  The command bar is being added by an Outlook 2003 add-in .dll.  I am making the .dll in VB6 as a COM Add-in.

I have no idea why a picture added to a commandbar must be so difficult. In any case I made my own little 16x16 and cut and copied the code from here http://support.microsoft.com/kb/288771

I even used the same color.
On my computer and my work computer this red color is made transparent, then wouldn't you believe it i gave it to someelse and the dam transparency does not work.

It turns out that if I change MS Office language to German that the transparency does not work.....how can a language change effect this.

I found that Microsoft Germany has the same code in german
http://support.microsoft.com/kb/288771/de Your browser might automatically at first go to an english version. But the code is the same

Does anyone have any help?


I have added the part of the .dll that adds the commandbar and picture to the bar.
SOLUTION
Avatar of alainbryden
alainbryden
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of darbid73

ASKER

Wow I have never heard of a default Environment transparency.  How do I find out what it is?

In any case if you can "Trust" microsoft their suggested code in Germany and English uses the same color which is &HFF00FF
 or Magenta (RGB(255, 0, 255))
Well if you explicitly used the colour definition in the mask (CopyBitmapAsButtonFace oPic, &HFF00FF
) then that probably isn't a problem. I was referring to how some colours are set to the System.Window colour, or System.ControlText. I was wondering whether you hadn't used a System.Mask colour property or something - but evidently you haven't. It was my only real idea :(

If your friend changes their MS Office language to english does it work? It could be that one of those many new functions you had to add refer to a LIB that is different for the German language pack?

--
Alain
I can reproduce the problem on my computer. ie. if Office is in English it makes the color transparent if I change my Office to German it shows the red.

My problem is that VB6 is not on a multilingual computer so I cannot debug all those functions.

So the LIBs are there, there is something in the language. :-(
Phew :/ Multi-language support is a challenging task that I have never undertaken... Good luck with this bro.
--
Alain
I have decided to install VB6 on a box that speak both languages - but if i may ask a dumb question - how do I debug this in VB6 it is an Add-in so can I step through it or do I have to print some output to a file?
I'm not sure, I've never debugged a VB6 add-on, but Visual Studio 2008 can probably do it.

--
Alain
Well alainbryden I am not sure this question is going to go any further.  I have asked a new question based on a totally different method https://www.experts-exchange.com/questions/24555748/Getting-the-BMP-image-right-for-a-transparent-image-on-the-CommandBar.html at least I can reliably get it NOT working irrespective of the language.

I am not sure we can take this question any further, and I am also not sure that I can say that it is answered either.  I would like to allocate some "Thank you for comforting me point" but It seems points only go with "this is a solution".  Would you have a problem with me closing this question without an answer?
No, that would be fine.

Good luck with the new method!

--
Alain
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial