Sorry der Quellcode ist nicht richtig dargestellt. Ich hoffe jetzt:
Delphi-Quellcode:
unit meinthread;
interface
uses
Classes, sysutils, windows;
type
test =
class(TThread)
private
{ Private-Deklarationen }
j: integer;
protected
procedure Execute;
override;
procedure getresult;
public
constructor create;
virtual;
end;
implementation
procedure test.GetResult;
begin
end;
procedure test.Execute;
begin
{ Thread-Code hier einfügen }
sleep(1000);
windows.beep(2000,50);
Synchronize(Getresult);
end;
constructor test.create;
begin
inherited create(true);
// CreateSuspended = true
freeOnTerminate := true;
end;
end.