unit Unit1;
...
implementation
uses unit2;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
l: Longint;
begin
l := GetWindowLong(Handle, GWL_EXSTYLE);
l := l or WS_EX_LAYERED;
SetWindowLong(Handle, GWL_EXSTYLE, l);
SetLayeredWindowAttributes(Handle, 0, 100, LWA_ALPHA);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
if Form2 = nil then
Form2 := TForm2.Create(nil);
Form2.FormStyle := fsMDIChild;
Form2.Show;
end;
end.
unit Unit2;
...
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
var
l: Longint;
begin
l := GetWindowLong(Handle, GWL_EXSTYLE);
l := l or WS_EX_LAYERED;
SetWindowLong(Handle, GWL_EXSTYLE, l);
SetLayeredWindowAttributes(Handle, 0, 200, LWA_ALPHA);
end;
end.
不行呀,我再怎么做