|
Background transparency (developer question)
|
|
01-17-2010, 04:19 AM
Post: #1
|
|||
|
|||
|
Background transparency (developer question)
Hi,
At first I want to compliment you for great software. I find batterybar very useful. As a developer I'm working on the project where I want to display information to the user through a Deskband, similar to your batterybar deskband (taksbar button). I have spent weeks on searching for a way to make the deskband background transparent. I have tried dozens of functions and Windows API calls, so I'm kind of desperate. I would be just great if you could give me a code snippet or any helpful information on how to make deskband have a transparent background. I am using Delphi to develop, but if you are using another dev. environment it could be the same API call or I could try to translate the code. Please help. Thank you. Slava |
|||
|
01-18-2010, 09:58 AM
(This post was last modified: 01-18-2010 09:59 AM by Chris.)
Post: #2
|
|||
|
|||
|
RE: Background transparency (developer question)
The code is C#.
In my IDeskBand implementation, I override the PaintBackground event: Code: protected override void OnPaintBackground(PaintEventArgs e)I have the band's BackColor set to Transparent. When I actually draw on the IDeskBand, I draw 32-bit ARGB graphics. One caveat I haven't worked around yet: When drawing text on my ARGB graphic, I cannot use ClearType if the Alpha is less than 255 because ClearType isn't compatible with semi-transparent backgrounds. There are methods specific to Vista/7 which allow for drawing glowing text on glass effects, but I wasn't able to get those to do what I wanted. So, instead I used a drawing path to draw the text. |
|||
|
01-20-2010, 03:43 AM
Post: #3
|
|||
|
|||
|
RE: Background transparency (developer question)
Thank you very very much!
I haven't get it working yet but the information you provided gets me forward. At least I know that I'll have to override the OnPaintBackground event to achieve this. With some more research on this part I will surely be able to implement it. Kind regards, Slava |
|||
|
« Next Oldest | Next Newest »
|





