
Zitat von
smart:
Vielen Dank für Eure Antworten!
Warum klappt dieser Code Nicht? Es kommt keine Fehlermeldung!
If Pos(Memo1.Text, '23') <> 0 Then Exit;
Edit: Hab Quatsch geschrieben.

So geht:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
s : string;
begin
s := memo1.text;
if Pos('wie', s) <> 0 then close;
end;
Wenn das Wort "wie" vorkommt wird das Programm beendet.