Splash & Login Form

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;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s