T
tanbo23456
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Buttons;
type
TForm1 = class(TForm)
PRIV: TTable;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
procedure OK1(Sender: TObject);
procedure exit1Click(Sender: TObject);
procedure FormCreat(Sender: TObject);
procedure Edit2KeyPress(Sender: TObject;var Ker:Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
count:integer
implementation
{$R *.dfm}
procedure TForm1.OK1Click(Sender: TObject);
var
results:variant;
begin
count:=count+1;
results:=table1.lookup('name',edit1.text,'passward');
if result=edit2.Text then
showmessage('cheng')
else
begin
showmessage('cuowu' );
if(count=3) then
close;
end;
end;
procedure TForm1.Edit2Change(Sender: TObject);
begin
if(key=#13)then
0k1.Click
else
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
table.Active:=true;
count:=0
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
close
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Buttons;
type
TForm1 = class(TForm)
PRIV: TTable;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
procedure OK1(Sender: TObject);
procedure exit1Click(Sender: TObject);
procedure FormCreat(Sender: TObject);
procedure Edit2KeyPress(Sender: TObject;var Ker:Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
count:integer
implementation
{$R *.dfm}
procedure TForm1.OK1Click(Sender: TObject);
var
results:variant;
begin
count:=count+1;
results:=table1.lookup('name',edit1.text,'passward');
if result=edit2.Text then
showmessage('cheng')
else
begin
showmessage('cuowu' );
if(count=3) then
close;
end;
end;
procedure TForm1.Edit2Change(Sender: TObject);
begin
if(key=#13)then
0k1.Click
else
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
table.Active:=true;
count:=0
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
close
end;
end.