?? login.pas
字號(hào):
unit login;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, DB, DBTables;
type
TLoginForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
pwd: TEdit;
OKBtn: TButton;
CancelBtn: TButton;
DataSource1: TDataSource;
UserTable: TTable;
Name: TDBComboBox;
private
{ Private declarations }
public
{ Public declarations }
function canPass:boolean;
end;
var
LoginForm: TLoginForm;
implementation
{$R *.dfm}
function TLoginForm.canPass: boolean;
var
V: Variant;
A: String;
begin
Result := False;
V := UserTable.Lookup('Name',
Name.Text,
'Password');
if not (VarType(V) in [varNull]) then begin
A := V;
if A = Pwd.Text then begin
Result := True;
Exit;
end;
end;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -