How to accept messages, interrupt the process being processed

xiaoxiao2021-03-06  65

Var Interrupt: Boolean; Procedure TFORM1.BUTTON5CLICK (Sender: Tobject); Begin Memo1.Lines.Add ('Button5Click OK'); Interrupt: = true;

Procedure TForm1.Button6Click (Sender: Tobject); Var i, J, N: Integer; Begin Interrupt: = false; for i: = 0 to 10000 do for j: = 0 to 10000 do begin inc); Application.ProcessMESSAGES If Interrupt Then Begin Memo1.Lines.Add ('Interrupt OK'); EXIT; End; End; Memo1.Lines.Add ('Button6Click OK');

转载请注明原文地址:https://www.9cbs.com/read-105917.html

New Post(0)