?? demopassword.pas
字號:
unit DemoPassword;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Passwords,
StdCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
GroupBox2: TGroupBox;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
GroupBox3: TGroupBox;
Label4: TLabel;
Label5: TLabel;
Edit3: TEdit;
Edit4: TEdit;
Button2: TButton;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
if ValidPassword(Edit1.Text)
then begin
Edit2.Text := SetPassword(Edit1.Text);
end
else MessageDlg('Creating a Strong Password' + #13#10 +
'The better your password, the harder it will be for others to guess. Here are some tips for' + #13#10 +
'creating a strong password: Don''t use single words that you can find in the dictionary.' + #13#10 +
'Instead, merge two or more words together or misspell them. Use a combination of upper' + #13#10 +
'and lowercase letters, numbers, and punctuation marks. Don''t choose words or numbers' + #13#10 +
'that might be easy to guess, such as your birthday, your spouse''s name, or your phone' + #13#10 +
'number. Change your password every three months or so.', mtInformation, [mbOk], 0);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if Password(Edit3.Text, Edit4.Text)
then MessageDlg('Password matched!!!', mtInformation, [mbOk], 0)
else MessageDlg('Password doesn''t match!', mtWarning, [mbOk], 0)
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -