线程问题,很郁闷!
glmis 2003-12-02 04:24:04 unit Unit2;
interface
uses
Classes,Windows, SysUtils;
type
TestThrd = class(TThread)
private
{ Private declarations }
i : integer;
protected
procedure Execute; override;
public
constructor Create(b : boolean);overload;
destructor Destroy;overload;
end;
implementation
constructor TestThrd.Create(b: boolean);
begin
//--出错 为什么?
inherited Create(b);
end;
destructor TestThrd.Destroy;
begin
inherited Destroy;
end;
procedure TestThrd.Execute;
begin
{ Place thread code here }
MessageBox(0,PChar('线程已经运行'),'消息',MB_OK);
end;
end.
====================================================================
为什么 inherited Create 处就出错呢?