⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit2.pas

📁 一个交通红绿灯线程
💻 PAS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -