为什么Delphi线程运行时会出现Abstract Error Exception?
Delphi线程运行时会出现Abstract Error Exception?
源代码:
type
TTest = class(TThread)
private
procedure Execute;
end;
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
FThread: TTest;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
procedure TTest.Execute;
begin
sleep(1000);
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
FThread:= TTest.Create(false);
end;
为什么??
怎样解决??