Creating the Windows taskbar appears transparent with Delphi.
Declaration Procedure:
SetTaskbarTrans procedure (n: Byte);
var
targetHwnd, xHwnd: hWnd;
begin
targetHwnd: = FindWindow ('Shell_TrayWnd','');
if targetHwnd <> 0 then
begin
xHwnd: = GetWindowLong (targetHwnd, GWL_EXSTYLE);
SetWindowLong (targetHwnd, GWL_EXSTYLE, xHwnd or WS_EX_LAYERED);
SetLayeredWindowAttributes (targetHwnd, 0, n, LWA_ALPHA);
end;
end;
Example of implementation:
TForm1.TrackBar1Change procedure (Sender: TObject);
begin
SetTaskbarTrans (TrackBar1.Position);
end;
No comments:
Post a Comment