Board index » delphi » Making the Desktop Transparent

Making the Desktop Transparent

Hi everybody,

I recently had a code snippet for making the desktop transparent, that is,
for making the color behind the caption of the icons on the desktop
disappear, but somehow I can't find it.

If anobody has a snippet for doing so, I'll greatly appreciate it if they
post it here or send it to me.

Thanks in advance,

Nicolas A. Gieczewski
NAG Software Solutions
http://www.nagsoftware.com/

 

Re:Making the Desktop Transparent


Get the handle of the desktop listview:

function GetLVH : Integer;
VAR PMH, SDH : Integer;
begin
  Result := 0;
  PMH := FindWindow('ProgMan', 'Program Manager');
  IF PMH = 0 THEN Exit;
  SDH := FindWindowEx(PMH, 0, 'SHELLDLL_DefView', nil);
  IF SDH = 0 THEN Exit;
  Result := FindWindowEx(SDH, 0, 'SysListView32', nil);
end;

Send it this message:

SendMessage(fLVH, LVM_SETTEXTBKCOLOR, 0, -1);

Note that any time the user tweaks the display settings, the transparency
will go away. Note that if the user has selected "View as Web Page" for
the desktop, this doesn't work.

--
Neil J. Rubenking
Contributing Technical Editor
PC Magazine

Other Threads