Hi,
mein Test-Programm sieht bisher so aus:
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 =
class(TForm)
TSelfThread =
class(TThread)
procedure Execute;
override;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
SelfThread: TSelfThread;
implementation
{$R *.dfm}
procedure TSelfThread.Execute;
begin
Sleep(10);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SelfThread := TSelfThread.Create(true);
//Thread inaktiv erzeugen
SelfThread.FreeOnTerminate := true;
//Thread nach dem Beenden freigeben
SelfThread.Resume;
//Thread aktivieren
end;
end.
Wenn ich ihn aber ausführen will kommt immer der Fehler:
Expeted ':' but '=' found.
Wo hab ich den Fehler gemacht ?
jeroen