Y
ychy
Unregistered / Unconfirmed
GUEST, unregistred user!
请问线程中的execte为什么不执行?
unit Unit2;
interface
uses
Classes,Windows,Messages,Winsock,stdctrls,Gauges,Sysutils;
type
TSgFilter = class(TThread)
private
{ Private declarations }
protected
wparent:HWND;
// ftp:Tidftp;
mylistbox:TListbox;
procedure Execute;
override;
public
constructor create(sparent:HWND;Listbox:Tlistbox);
end;
implementation
constructor TSgFilter.create (sparent:HWND;listbox:Tlistbox);
begin
inherited Create(true);
Freeonterminate:=true;
mylistbox:=listbox;
wparent:=sparent;
resume;
end;
procedure TSgFilter.Execute;
var
I,j:integer;
begin
for i:=0 to mylistbox.Count - 1do
begin
j:=i+1;
end;
end;
end.
unit Unit2;
interface
uses
Classes,Windows,Messages,Winsock,stdctrls,Gauges,Sysutils;
type
TSgFilter = class(TThread)
private
{ Private declarations }
protected
wparent:HWND;
// ftp:Tidftp;
mylistbox:TListbox;
procedure Execute;
override;
public
constructor create(sparent:HWND;Listbox:Tlistbox);
end;
implementation
constructor TSgFilter.create (sparent:HWND;listbox:Tlistbox);
begin
inherited Create(true);
Freeonterminate:=true;
mylistbox:=listbox;
wparent:=sparent;
resume;
end;
procedure TSgFilter.Execute;
var
I,j:integer;
begin
for i:=0 to mylistbox.Count - 1do
begin
j:=i+1;
end;
end;
end.