bhh:=tbhh.create(false);
button1.enabled:=false;
button2.enabled:=true;
button3.enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if dstep=false then begin bhh.suspend; dstep:=true end
else bhh.resume
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
dstep:=false; bhh.resume;
end;
(2)代码单元unit2:
文章来源于领测软件测试网 https://www.ltesting.net/