How about a timer that creates a new thread object from it's OnTimer event? 
All you need to do is drop a standard timer on your form and create your 
thread object from it's OnTimer event, something like this:

<code>
procedrue Form1.OnTimer(Sender:TObject);
var Thread:TMyThread;
begin
  Thread := TMyThread.Create(True);
  Thread.FreeOnTerminate := True;
  Thread.Resume;
end;
</code>

Writing the code for TMyThread is not that hard:

<code>
type
  TMyThread = class(TThread)
  public
    procedure Execute;override;
  end;

procedure TMyThread.Execute;
begin
  // Your code goes here!
end;
</code>

Please be aware I wrote all the code in those samples in my mail editor, 
they might not compile, but you got the general idea.

rinke hoekstra wrote:
> I need a timer which executes its OnTimer event in a separated
> thread, which will be created by the timer itself whenever it fires.
>
> Any suggestions for some free to download Timer component which
> behaves like this??
>
> I'm using Delphi 5 professional.
>
> thanks,
>
> rinke
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to