unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
CountEnterPass : ShortInt;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if CountEnterPass < 2 then
begin
if Edit2.Text = 'youcefcripcho' then
ShowMessage('Thank You, Enjoy ..!')
end
else
begin
ShowMessage('Sorry !!, The program will exit');
Close;
end;
Inc(CountEnterPass);
end;
end.