M
mxk130
Unregistered / Unconfirmed
GUEST, unregistred user!
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;
TmyThread=class(Tthread)
protected
procedure Execute;
override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TmyThread }
procedure TmyThread.Execute;
var
i:integer;
begin
for i:=0 to 3do
begin
showmessage(inttostr(i));
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
myThread:TmyThread;
begin
myThread:=TmyThread.Create(true);
myThread.FreeOnTerminate:=true;
myThread.Resume;
end;
end.
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;
TmyThread=class(Tthread)
protected
procedure Execute;
override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TmyThread }
procedure TmyThread.Execute;
var
i:integer;
begin
for i:=0 to 3do
begin
showmessage(inttostr(i));
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
myThread:TmyThread;
begin
myThread:=TmyThread.Create(true);
myThread.FreeOnTerminate:=true;
myThread.Resume;
end;
end.