Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

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.
0
Mirx
Asked:
Mirx
  • 2
  • 2
1 Solution
 
ZasdCommented:
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...
0
 
ZasdCommented:
a good VB api program is API-Guide which can be found at: www.allapi.net
0
 
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.
0
 
moduloCommented:
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/CleanUp/Q_20606014.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
0
 
moduloCommented:
Saving this Q as a PAQ and refunding the 100 points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Technology Partners: 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!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now