📄 unit3.~pas
字号:
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TLOGO = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Label1: TLabel;
Label2: TLabel;
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
LOGO: TLOGO;
time: Ttime;
implementation
uses Unit4, Unit1;
{$R *.dfm}
procedure TLOGO.BitBtn2Click(Sender: TObject);
begin
close;
end;
procedure TLOGO.BitBtn1Click(Sender: TObject);
begin
if (edit1.Text='') or (edit2.Text='') then
begin
showmessage('请将用户信息输入完整!');
exit;
end;
dm.adoquery1.Close;
dm.adoquery1.SQL.Clear;
dm.adoquery1.SQL.Add('select * from agan where name='''+edit1.text+''' and password='''+edit2.Text+'''');
dm.adoquery1.Open;
// showmessage(cstr(dm.adoquery1.RecordCount));
if (dm.adoquery1.RecordCount<1) then
begin
showmessage('对不起,用户名或密码不正确!');
time:=time+1;
if (time=3) then Close;
end;
if trim(edit1.Text)='admin' then
begin
form1.N7.Visible:=false;
form1.show;
hide;
end
else
begin
form1.show;
hide;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -