I writing a VB6 app that dynamically creates an icon (The icon contains text) for display in the Systray. I am using a PictureBox and writing to it (picturebox1.Print). Then I'm adding it to a ImageList1 and extracting (ImageList1.ListImages(1).ExtractIcon) the icon to displaying the icon in the system tray. I would like to be able to set the backcolor of my icon to match the backcolor of the systray (or set the backcolor of the picturebox to transparent). Choosing any other color doesn't look right when you change color schemes in XP because the systray.backcolor changes from a grey to a blue. Can someone help me out.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you can use the shell_notifyicon api function to set the taskbar icon. im not sure about transparency though.

Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long

about the picture box being transparent, probably wont happen. i am making an rpg game and ive tried to make pics transparent. just wont work. if u ever do find out i bet alot of people would like to know, especially me. you may want to use the transparentBlt function:

Declare Function TransparentBlt Lib "msimg32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal crTransparent As Long) As Boolean

again ive not tried it but its a possible option. let me know what happens...
a good VB api program is API-Guide which can be found at:
MirxAuthor Commented:
Well, I just decided to determine standard scheme colors and make them available as used selectable options or allow the user to choose what color they want.
Thanks for the suggestions.
Dear expert(s),

A request has been made to close this Q in CS:

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.


Community Support Moderator
Experts Exchange
Saving this Q as a PAQ and refunding the 100 points to the questionner


Community Support Moderator
Experts Exchange

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.