Ver Mensaje Individual
  #5  
Antiguo 15-10-2008
Avatar de duilioisola
[duilioisola] duilioisola is offline
Miembro Premium
 
Registrado: ago 2007
Ubicación: Barcelona, España
Posts: 1.735
Reputación: 20
duilioisola Es un diamante en brutoduilioisola Es un diamante en brutoduilioisola Es un diamante en bruto
Se me ocurre que al momento de crearlos le des un nombre significativo, por ejemplo Timer+PosiciónenArray.

Código Delphi [-]
   ...
   ArrayTimer[Posicion] := TTimer.Create()
   TTimer(ArrayTimer[Posicion]).Name := 'Timer'+IntToStr(Posicion);
   ...


Luego en el evento OnTimer:

Código Delphi [-]
begin
   {Name = TimerNNN - PosicionEnArray = NNN}
   posicionEnArray := StrToInt(copy(TTimer(Sender).Name,6,length(TTimer(Sender).Name-5)));
   ...
end;
Responder Con Cita