Hi ich habe folgendes Problem das ich nich verstehe:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26:
| procedure TForm1.Server1Execute(AThread: TIdPeerThread); var SEin: string; begin with athread.connection do begin sein := readln; if SEin <> '' then begin if SEin = '$55"Ende*#22' then Application.terminate; else if SEin = '$55"Test*#22' then begin if checkbox1.Checked = false then begin writeln('$55"Bestätigt*#22');
end; end else begin listbox1.lines.Add(SEin); if application.Active = FALSE then mmsystem.PlaySound('Tada',1,1); tt.ShowMainForm; form1.BringToFront; application.BringToFront; end; sein := ''; end; end; end; |
An die Stelle wo Application.terminate steht, kommt er zwar wenn die bedingung erfüllt ist, er schließt die Anwendung aber nicht.
Vielleicht kann mir ja jemand weiterhelfen