?
Solved

SysTray.backcolor

Posted on 2003-03-02
5
Medium Priority
?
137 Views
Last Modified: 2010-05-01
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
Comment
Question by:Mirx
[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
  • 2
  • 2
5 Comments
 

Expert Comment

by:Zasd
ID: 8053686
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
 

Expert Comment

by:Zasd
ID: 8053693
a good VB api program is API-Guide which can be found at: www.allapi.net
0
 
LVL 1

Author Comment

by:Mirx
ID: 8175669
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
 

Expert Comment

by:modulo
ID: 8466311
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8489729
Saving this Q as a PAQ and refunding the 100 points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

765 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