SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Suspend/resume thread

To set thread in suspend/resume status, use Suspend/Resume property of TThread type.


type
  TTestThread = class(TThread)
  private
    j: Integer;
  protected
    procedure GetInfo;
    procedure Execute; override;  
  end;
...
var
  NewThread: TTestThread;
...

procedure TForm1.Button2Click(Sender: TObject);
begin
  NewThread.Resume;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  NewThread.Suspend;
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes