📄 getpasswordu.pas
字号:
unit GetPasswordU;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TGetPasswordForm = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
GetPasswordForm: TGetPasswordForm;
function GetPassWord(Password:PChar):Boolean;export;
implementation
{$R *.dfm}
function GetPassWord(Password:PChar):Boolean;
var
GetPasswordForm: TGetPasswordForm;
begin
Result := False;
GetPasswordForm := TGetPasswordForm.Create(Application);
try
with GetPasswordForm do
if ShowModal =mrOK then
if UpperCase (Edit1.Text) <> StrPas(StrUpper(Password)) then
messageDlg('密码不正确! ',mtWarning,[mbOK],0)
else
Result := True;
finally
GetPasswordForm.Free;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -