On the form of two buttons - Button1 and Button2. In Button1, when pressed, a loop is performed, reading a text, processing and saving the result.
How you can implement: Stop the loop when you click the Button2 button:
var f1,f2:TextFile; s:string; i:integer; ................................... ///////////////Я так поняла где то вот тут нужно вставить условие ? while not Eof(f1) do begin Application.ProcessMessages; /////// что бы программа не зависала Readln(f1,s); s := AnsiUpperCase(s); Writeln(f2,s); end; CloseFile(f1); CloseFile(f2); end;