Tema: Semáforo
Ver Mensaje Individual
  #14 (permalink)  
Antiguo 13/06/2006, 15:45
jericosoft
 
Fecha de Ingreso: febrero-2006
Mensajes: 37
Antigüedad: 18 años, 3 meses
Puntos: 0
P.D.

No olvides cambiar el atributo de BackStyle en los Shapes a 1 - Opaco
para que coloree

Espero te sirva




Dim mueve

Private Sub Command1_Click()

mueve = mueve + 1: If mueve > 3 Then mueve = 1

If mueve = 1 Then Shape_Verde.BackColor = vbGreen Else Shape_Verde.BackColor = vbWhite
If mueve = 2 Then Shape_amarillo.BackColor = vbYellow Else Shape_amarillo.BackColor = vbWhite
If mueve = 3 Then Shape_rojo.BackColor = vbRed Else Shape_rojo.BackColor = vbWhite

End Sub
__________________
Jerico