Splash & Login Form

Referensi PBO 1 (Delphi)

Contoh pertama://Membuat Splash

Procedure tform1.formcreate(sender:tobject);

Begin

Timer1.enabled:=true;

X:=1; // global variabel

End;

Procedure tform1.timer1timer(sender:tobject);

Begin

X:=X+1;

If X=7 then // jika tujuh detik

Begin

Flogin.show;

Form1.destroy;

End;

End;

Procedure tform1.formshow(sender:tobject);

Begin

If (form1.width>width) then

Left:=form1.left+(form1.width-width) div 2

Else

Left:=form1.left;

If (form1.height>height) then

top:=form1.top+(form1.height-height) div 2

Else

Top:=form1.top;

End;

Contoh kedua://Membuat Login

Procedure tform1.bitbtn1click(sender:tobject);

Begin

If (edit1.text:=’public’) then

Begin

With fmenutama do

Begin

Mahasiswa1.enabled:=false; // items di menu

Praktikum1.enabled:=false; // items di menu

Fmenutama.show;

Flogin.close;

End;

End

Else

If (edit1.text:=’operator’) and (edit2.text=table1.fields[0].AsString) then

Begin

Fmenutama.show;

Flogin.close;

End

End;

Share this

Leave a Reply

Your email address will not be published.