Solved

MS Office Command Bar button image Transparency problem

Posted on 2009-07-07
10
572 Views
Last Modified: 2013-11-18

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.
0
Comment
Question by:darbid73
  • 5
  • 5
10 Comments
 
LVL 20

Assisted Solution

by:alainbryden
alainbryden earned 200 total points
ID: 24795874
Is red the default transparent colour? You could be getting the problem because you've set to transparent colour for the toolbar to the Environment Default instead of to 'Red' explicitly. If this is the case, when the environment changes, the default transparent colour might change too, ruining your transparency.

--
Alain
0
 
LVL 19

Author Comment

by:darbid73
ID: 24795914
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))
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 24796028
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
0
 
LVL 19

Author Comment

by:darbid73
ID: 24796083
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. :-(
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 24796217
Phew :/ Multi-language support is a challenging task that I have never undertaken... Good luck with this bro.
--
Alain
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 19

Author Comment

by:darbid73
ID: 24798286
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?
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 24804057
I'm not sure, I've never debugged a VB6 add-on, but Visual Studio 2008 can probably do it.

--
Alain
0
 
LVL 19

Author Comment

by:darbid73
ID: 24811918
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 http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_24555748.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?
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 24815198
No, that would be fine.

Good luck with the new method!

--
Alain
0
 
LVL 19

Accepted Solution

by:
darbid73 earned 0 total points
ID: 24815457
Actually to round of this thread and the third and final method WHICH WORKED for me I used this tutorial here. http://www.vbforums.com/showthread.php?t=402044  It basically means that you use a mask.  I did not have to use flash graphical programs and it works in all languages.

I also learnt how to pack my files as resources into my VB6 COM Add-in so I am pretty impressed with myself.


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now