用这两个消息可以做到的!
procedure MouseOut(var Message: TMessage); message cM_MouseLeave;
procedure MouseEn(var Message: TMessage); message cM_MouseEnter;
分别写代码!
procedure TForm1.MouseEn(var Message: TMessage);
begin
form1.Height := 100;
inherited;
end;
procedure TForm1.Mouseout(var Message: TMessage);
var i:integer;
begin
for i := 0 to 90 do form1.Height := form1.Height - 1;
inherited;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
form1.top := 0;
end;