Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transparent desktop icon text

0 views
Skip to first unread message

Tom Bradshaw

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
Hi,
I have seen some programs that can make the background of the icon text
on the windows desktop transparent, how is this done?

Thanks
tom.br...@zytek.co.uk


Earl F. Glynn

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
"Tom Bradshaw" <tom.br...@zytek.co.uk> wrote in message
news:39292d11@dnews...

> I have seen some programs that can make the background of the icon text
> on the windows desktop transparent, how is this done?

Set the Brush to bsClear to write text with a transparent background.


--
efg

Earl F. Glynn E-mail: Earl...@att.net
Overland Park, KS USA

efg's Computer Lab: http://www.efg2.com/Lab

Tom Bradshaw

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
Windows desktop icons, how do you make the text background for 'Recycle
Bin', 'My Computer', etc. transparent?

Earl F. Glynn

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
"Tom Bradshaw" <tom.br...@zytek.co.uk> wrote in message
news:39293534@dnews...

> Windows desktop icons, how do you make the text background for 'Recycle
> Bin', 'My Computer', etc. transparent?

I thought you were talking about text in general using Delphi, not the specific
Windows desktop
icons. Unless there's a registry entry somewhere that controls this, I'm not
aware of how
you can change the transparency of a desktop icon's text from inside a Delphi
program.

You might try asking in borland.public.delphi.winapi.

Finn Tolderlund

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
Try this:

function EnumChildProc(AHandle: hWnd): BOOL; stdcall;
// callback for EnumChildWindows.
var
tmpS: string;
theClassName: string;
clrText: Integer;
begin
Result := True;
SetLength(theClassName, 256);
GetClassName(AHandle, PChar(theClassName), 255);
tmpS := PChar(theClassName);
if Pos('SysListView32', tmpS) > 0 then
begin // ColorToRGB(clNone)
clrText := -1; // Desired background color
SendMessage(AHandle, LVM_SETTEXTBKCOLOR, 0, clrText);
clrText := $FFFFFF; // Desired text color (BGR)
SendMessage(AHandle, LVM_SETTEXTCOLOR, 0, clrText);
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
const
WM_REFRESH_DESKTOP = $A065;
var
WndClass: array[0..50] of char;
h: THandle;
begin
WndClass := 'Progman';
h := FindWindow(@WndClass[0], 'Program Manager');
EnumChildWindows(h, @EnumChildProc, 0);
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0);
end;

Finn Tolderlund

"Tom Bradshaw" <tom.br...@zytek.co.uk> skrev i en meddelelse
news:39292d11@dnews...


> I have seen some programs that can make the background of the icon
text
> on the windows desktop transparent, how is this done?

> Thanks
> tom.br...@zytek.co.uk


Specktor

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
Icon Editors assign a specifc color (usually 0,0,0) to the "background",
this color or color index is used by the OS to OR against the background.

Tom Bradshaw <tom.br...@zytek.co.uk> wrote in message
news:39293534@dnews...
> Windows desktop icons, how do you make the text background for 'Recycle
> Bin', 'My Computer', etc. transparent?
>
>

> > > I have seen some programs that can make the background of the icon
> text
> > > on the windows desktop transparent, how is this done?
> >

Remco de Korte

unread,
May 23, 2000, 3:00:00 AM5/23/00
to
Oooo, I like!

I wanted to do this for a long time.
Thanks (for asking and aswering).

Remco

http://www.xs4all.nl/~remcodek/

Neil J. Rubenking

unread,
May 23, 2000, 3:00:00 AM5/23/00
to
In article <39293534@dnews>, tom.br...@zytek.co.uk says...

> Windows desktop icons, how do you make the text background for 'Recycle
> Bin', 'My Computer', etc. transparent?
>
Tom,

What Finn said. Basically, you get the window handle of the SysListView32
that represents the desktop, and you send it an LVM_SETTEXTBKCOLOR
message, setting the background color to -1. That causes it to be
transparent.

Note that this is an impermanent state of affairs. Any change to the
desktop properties will reset the text background color to normal. Also,
it doesn't work when you've checked Active Desktop | View as Web Page for
the desktop.
--
Neil J. Rubenking
Contributing Technical Editor
PC Magazine

0 new messages