Creamos unformulario nuevo y insertamos 8 imagenes diferentes:
Estas imagenes deveran tener parejas, encima de las imagenes insertaremos una picture en negro de sesta manera las imagenes quedaran cubiertas por un fondo en negro:
Despues agregaremos los componentes necesarios para poder agregar un progress bar:
Tambien crearemos un timer en el cual pondremos el siguiente codigo:
Private Sub Timer2_Timer()
x = x + 1
ProgressBar1.Value = x
If x >= 100 Then Timer2.Enabled = False
Picture1(x / 100 * 15).Visible = True
Image1(x / 100 * 15).Visible = True
End Sub
Despues otro timer con el codigo siguiente:
Private Sub Timer3_Timer()
Picture1(i1).Visible = TrueTimer3.Enabled = False
End Sub
Para finalixzar el ultimo codigo en el timer 4 :
este codigo sirve para mostrar el tiempo transcurido en el form:
Private Sub Timer4_Timer()
If ProgressBar1.Value = 100 Then
tiempo = tiempo + 1
t1.Text = tiempo
End If
End Sub
En el click de las imagenes pondremos el siguiente codigo:
Private Sub Picture1_Click(Index As Integer)
If Timer3.Enabled = True Then
If Image1(i1).Picture = Image1(Index).Picture Then
Picture1(i1).Enabled = False
Picture1(Index).Enabled = False
Picture1(i1).Visible = False
Picture1(Index).Visible = False
AC = 1
Else
Picture1(i1).Visible = TrueTimer3.Enabled = False
End If
End If
If AC = 0 Then
Picture1(Index).Visible = False
i1 = Index
Timer3.Enabled = True
End If
End Sub