K
koy0755
Unregistered / Unconfirmed
GUEST, unregistred user!
源程序如下,我只想试验打开thread status窗口,看是否会多一个线程.但总是失败.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
mythread = class(TThread)
private
public
procedure Execute;
override;
end;
var
Form1: TForm1;
tth:mythread;
implementation
{$R *.dfm}
procedure mythread.Execute;
begin
sleep(1000);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
tth.Create(true);
end;
end.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
mythread = class(TThread)
private
public
procedure Execute;
override;
end;
var
Form1: TForm1;
tth:mythread;
implementation
{$R *.dfm}
procedure mythread.Execute;
begin
sleep(1000);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
tth.Create(true);
end;
end.