unit2.pas
来自「一个交通红绿灯线程」· PAS 代码 · 共 37 行
PAS
37 行
unit Unit2;
interface
uses
Classes, SysUtils;
type
Tthread2 = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses main;
{ Tthread2 }
procedure Tthread2.Execute;
begin
{小车循环行驶}
while not terminated do
begin
{ Place thread code here }
Form1.Image2.Left := Form1.Image2.Left - 1;
if Form1.Image2.Left <= -38 then
begin
Form1.Image2.Left := 496;
end;
sleep(5);
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?