Ver Mensaje Individual
  #11  
Antiguo 19-06-2008
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 19.441
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
(1) Crea un formulario con los 4 labels con nombres label0, label1, label2 y label3, 1 share y un TTimer.
(2) El intervalo del timer, cada 2000 milisegundos, por ejemplo.
(3) En el evento del timer programa lo siguiente:

Código Delphi [-]
var
  i:Integer;
  lbl:TLabel;
begin
  i := Random(1000);
  i := i MOD 4;

  TComponent(lbl) := FindComponent('Label'+IntToStr(i));

  // encontrado?
  if Assigned(lbl) then begin
    Shape1.Left := lbl.Left;
    Shape1.Top := lbl.Top;
  end;

(4) Y en el show:
Código Delphi [-]
  RandSeed := GetTickCount;
  Randomize;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita