Hallo nochmal himitsu.
Das ganze sieht bei mir nun so in etwa aus.
Delphi-Quellcode:
type
myThread = class(TThread)
fSleepRequest : Boolean;
IdHTTPLT: TIdHTTP;
procedure MyLabelsClick(Sender: TObject);
protected
procedure Execute; override;
Public
Procedure GotoSleep;
Procedure WakeUp;
end;
......
procedure mythread.MyLabelsClick(Sender: TObject);
begin
(Sender as TLabel).Color := clRed;
end;
procedure mythread.execute;
var
Names : Array [0..5] of TLabel;
begin
//Objekte erzeugen
for i:=0 to high(names) do
begin
Names[i] := TLabel.Create(Form1);
Names[i].OnClick := mythread.MyLabelsClick;
end;
//anzeigen
for i:=0 to high(names) do
Names[i].Parent:=Form1;