22.06.2010, 16:16
|
|
Администратор
|
|
Регистрация: 03.10.2005
Адрес: Россия, Москва
Сообщения: 1,533
Версия Delphi: Delphi 7
Репутация: выкл
|
|
Исходник позволяющий сделать панель задач прозрачной
Код:
{
THIS IS A SAMPLE, HOW TO SET YOUR TASKBAR TRANSPARENCY VALUE
Noviyanto Wibowo
http://opxbit.web.id
info@opxbit.web.id
mockheroicx@yahoo.com
}
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
GroupBox1: TGroupBox;
barX: TTrackBar;
Label2: TLabel;
Label1: TLabel;
procedure barXChange(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure SetTaskbarTrans(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;
procedure TForm1.barXChange(Sender: TObject);
begin
Label2.Caption:= IntToStr(BarX.Position);
SetTaskbarTrans(BarX.Position);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
BarX.Position:= 255;
end;
end.
|