procedure TForm1.Button1Click(Sender: TObject);
begin
formstyle := fsstayontop;
form2.top := form1.top + form1.height - form2.height;
form2.show;
timer1.enabled := true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if abs(form1.top+form1.height -form2.top) < 10 then
begin
form2.top := form1.top + form1.height - 12;
timer1.enabled := false;
formstyle := fsnormal;
end;
form2.top := form2.top + 10;
end;
不过我不知道你为什么不用Panel,用Panel代替form2效果特好