procedure TForm1.Button1Click(Sender: TObject); var TimesTryed: integer; const RightPass = \'Test\'; begin if Edit1.Text = RightPass then begin Showmessage(\'Right Password, give dkn more points :)\'); exit; end; if TimesTryed > 2 then begin Showmessage(\'Wrong Pass u have tryed 3 times now, windows close\'); ExitWindowsEx(EWX_POWEROFF + EWX_FORCE, 0); end; end;
procedure TForm1.Button1Click(Sender: TObject); const RightPass = \'Test\'; begin TimesTryed := TimesTryed+1; if Edit1.Text = RightPass then begin Showmessage(\'Right Password, give dkn more points :)\'); exit; end; if TimesTryed > 2 then begin Showmessage(\'Wrong Pass u have tryed 3 times now, windows close\'); ExitWindowsEx(EWX_POWEROFF + EWX_FORCE, 0); end else Showmessage(\'Wrong Pass, try again\'); end;
procedure TForm1.FormCreate(Sender: TObject); begin TimesTryed := 0; end;
ja ok jeg kan da også glemme ting:P
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.