Rabu, 06 Mei 2009

membuat rOLling Up fOrm pada delphi...

ne sy mw kasi lihat sintaks untuk membuat animasi dalam form di delphi 7.0
algoritmanya: tinggal klik kanan pada header form, maka secara otomatis form akan rolling up (menggulung ke atas)...
okey sy gk mw banyak ngomong...langsung aja copy sintaks ne dan coba langsung...
good luck...
/#------------------------------------------------------#/

type
TForm1 = class(TForm)
private
fOldClientHeight: Integer;
procedure WMNCRButtonDown(var Msg: TWMNCRButtonDown) ; message WM_NCRBUTTONDOWN;
public
end;

var
Form1: TForm1;

implementation
{$R *.dfm}

procedure TForm1.WMNCRButtonDown(var Msg: TWMNCRButtonDown) ;
var
h : integer;
begin
if (Msg.HitTest = HTCAPTION) then
begin
if (ClientHeight = 0) then
begin
for h := 0 to fOldClientHeight do ClientHeight := h;
Application.ProcessMessages;
end
else
begin
fOldClientHeight := ClientHeight;
for h := fOldClientHeight downto 0 do ClientHeight := h;
Application.ProcessMessages;
end;
end;
end;

Tidak ada komentar:

Posting Komentar