Visual Basic - AYUDA

Life is soft - evento anual de software empresarial
 
Vista:

AYUDA

Publicado por ELIZA (24 intervenciones) el 05/03/2007 16:11:39
HOLA TENGO UNA PEQUEÑA DUDA
TENGO ESTE CODIGO PARA HACERR UN EFECTO DE MAQUINA DE ESCRIBIR PARA UN LABEL LO QUE YO QUISIERA ES KE FUNCIONARA PARA 3 LABELS COMO LE PODRIA HACER

Option Explicit
Dim a As String
Dim t As String
Dim b As Integer
Dim I As Integer

Private Sub Form_Load()
CheckAgain
End Sub

Private Sub Timer1_Timer()
Label2.Visible = True
t = Left(a, b)
Label2.Caption = t
b = b + 1
If b > I Then
b = 0
End If
End Sub

Sub CheckAgain()
a = Label2.Caption
I = Len(a)
b = 0
End Sub

O SI TIENEN OTRO CODIGO KE ME AYUDE SE LOS AGRADECERE
GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA

Publicado por quique (17 intervenciones) el 05/03/2007 16:18:12
ya lo habías preguntado, pero desde la vez anterior no se entiende, amor.
si nos lo explicas mejor quiza podamos ayudarte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA

Publicado por ELIZA (24 intervenciones) el 05/03/2007 17:07:19
SOLO LO KE KIERO ES UN EFECTO DE MAQUINA DE ESCRIBIR PARA UNOS LABELS
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA

Publicado por Pedro Luis (878 intervenciones) el 05/03/2007 17:13:17
La solución la tienes usando Index.
Las etiquetas pueden ser Label(1), Label(2) y Label (3), todas las que quieras, y llamalas por su index.
El código puede quedar así

Private Sub Timer1_Timer()
Label(index).Visible = True
t = Left(a, b)
Label(index).Caption = t
b = b + 1
If b > I Then
b = 0
End If
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA

Publicado por ELIZA (24 intervenciones) el 05/03/2007 17:33:27
PERDONAME CREO KE NO ME EXPLIQUE BIEN
CUANDO TERMINE DE MOSTRAR EL PRIMER LABEL KIERO KE ME MUESTRE EL SEGUNDO LABEL Y ASI CON TODOS
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

ESE CODIGO NO FUNCIONA!

Publicado por quique (17 intervenciones) el 05/03/2007 17:35:07
pruébalo y verás.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA

Publicado por Alex (53 intervenciones) el 05/03/2007 18:00:13
La solución mas facil pasa por crear un control de labels como te dijeron anteriormente. Tienes que incluir una nueva variable (x) para el control del index de los labels:

Option Explicit
Dim a As String
Dim t As String
Dim b As Integer
Dim I As Integer
Dim x As Integer

Private Sub Form_Load()
Label1(0).Caption = "Esta es la label numero one."
Label1(1).Caption = "Y esta es otra distinta"
Label1(2).Caption = "y esta otra no se parece en nadas a las anteriores."
For I = 0 To 2
Label1(I).Visible = False
Next I
a = Label1(x).Caption
Timer1.Interval = 200
End Sub

Private Sub Timer1_Timer()
Label1(x).Visible = True
t = Left(a, b)
I = Len(a)
Label1(x).Caption = t & "_"
b = b + 1
If b > I Then
Label1(x).Caption = Left(a, b - 1)
b = 0
x = x + 1
If x = 3 Then
Timer1.Enabled = False
Else
a = Label1(x).Caption
End If
End If
End Sub

Así funcionará
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar