[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MS Office Command Bar button image Transparency problem

Posted on 2009-07-07
10
Medium Priority
?
590 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 21

Assisted Solution

by:alainbryden
alainbryden earned 800 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 20

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 21

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

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 21

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
 
LVL 20

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 21

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 20

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 21

Expert Comment

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

Good luck with the new method!

--
Alain
0
 
LVL 20

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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

656 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