?? unit2.~pas
字號(hào):
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
var1,var2:STRING;
implementation
uses unit3;
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
begin
var1:=Edit1.Text;
var2:=Edit2.Text;
if(var1='')and (var2='')then
ShowMessage('請(qǐng)輸入用戶名和密碼')
else if(var1<>'')and(var2='')then
ShowMessage('請(qǐng)輸入密碼')
else if(var1='')and(var2='')then
ShowMessage('請(qǐng)輸入用戶名')
else if(var1='qqq')and(var2='qqq')then
begin
ShowMessage('登陸成功');
form3.Show;
end
else
ShowMessage('對(duì)不起,您無權(quán)訪問');
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
close;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -