fmendless.pas

来自「多数代码可以直接在Delphi6和Delphi7环境下运行。部分涉及.NET技术」· PAS 代码 · 共 49 行

PAS
49
字号
unit fmEndless;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, uEndlessThread;

type
  TForm1 = class(TForm)
    ListBox1: TListBox;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  procedure DoInit;
  procedure DoFinalize;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure DoInit;
var
  iCount : Integer;
begin
  Randomize;
  Form1 := TForm1.Create(nil);
  Form1.Show;
  for iCount := 1 to 100 do    // Iterate
  begin
    Form1.ListBox1.Items.Add(IntToStr(GetCurrentThreadID) + ' : ' + IntToStr(iCount));
    Application.ProcessMessages;
  end;
end;

procedure DoFinalize;
begin
  Form1.Close;
  FreeAndNil(Form1);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?