How can i use a type "TTimer" even "onTimer" in console program?
TIA:
type TTimerEventos=class
procedure OnTimerTimer(Sender: TObject);
in implementation:
TTimerEventos.OnTimeTimer(Sender: TObject);
begin
//do whatever you like
end;
in procedure that creates timer (for sample called DynaTimer):
{Code that creates timer and sets it's all properties}
DynaTimer.OnTimer:=TTimerEventos.OnTimerTimer;
{rest of code}
Users browsing this forum: No registered users and 1 guest