Link to home
Start Free TrialLog in
Avatar of Mirx
Mirx

asked on

SysTray.backcolor

Hello,

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.

Thanks.
Avatar of Zasd
Zasd

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: www.allapi.net
Avatar of Mirx

ASKER

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:
https://www.experts-exchange.com/questions/20606014/Close-and-Refund-please.html

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.

modulo

Community Support Moderator
Experts Exchange
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

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