Tampilan Desain |
Tampilan Setelah Dijalankan |
Coding/Listing :
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.bloginClick(Sender: TObject);
begin
if(euser.Text = Tabel1.FieldByName('User_Name').AsString) and (epassword.Text = Tabel1.FieldByName('Password').AsString) then
begin
messagedlg('Silakan Masuk!',MTWarning, [MBOK],0);
Form2.Show;
Exit;
end;
messagedlg('Maaf User atau Password Anda Salah!', MTWarning, [MBOK],0);
euser.Text := '';
epassword.Text := '';
euser.SetFocus;
end;
procedure TForm1.bexitClick(Sender: TObject);
begin
if(application.MessageBox('Yakin Ingin Keluar Dari Program Ini..?!','Question',4+32)=6)then
close;
end;
procedure TForm1.epasswordKeyPress(Sender: TObject; var Key: Char);
begin
if key = #13 then
blogin.Click;
end;
procedure TForm1.bregisterClick(Sender: TObject);
begin
Form1.Hide;
FUser.show;
end;
end.
0 komentar:
Posting Komentar