Thanks
tom.br...@zytek.co.uk
> 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
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.
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
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?
> >
I wanted to do this for a long time.
Thanks (for asking and aswering).
Remco
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