Que tal Foreros!
Tengo una duda... hay alguna funcion o alguna manera de retrasar la ejecucion de cada comando... es decir:
Yo aprieto por ejemplo el command 1 y quiero que valla cambiando el text1 cada no se 1 segundo pero sin usar un timer poner:
Private Sub Command1_Click()
Text1.Text = "hola"
Text1.Text = "Como andas?"
Text1.Text = "Bien y vos?"
End Sub
Y poder poner todo junto con alguna instruccion que haga que se demore por que si no el texto cambiaria tan rapido que yo solo verie el "Bien y vos?"
Bueno era eso solo
Gracias!
Sleep()
Do while
Mirá esto
http://support.microsoft.com/kb/212667
Gracias pero... Use Sleep
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Sleep 1200
Text1.Text = "hola!"
Sleep 1233
Text1.Text = "jeje"
Sleep 1212
Text1.Text = "ÑÑÑ"
End Sub
De esa forma
y cuando aprete el command1 se demoro un tiempo y puso "ÑÑÑ"
:(
¿que hice mal?
En la misma pagina de el hacker se encuantra:
http://www.elhacker.net/trucosvisual.htm (http://www.elhacker.net/trucosvisual.htm)Citar
Ejecuta pausas durante un determinado espacio de tiempo en segundos:
Llamada: Espera(5)
Sub Espera(Segundos As Single)
Dim ComienzoSeg As Single
Dim FinSeg As Single
ComienzoSeg = Timer
FinSeg = ComienzoSeg + Segundos
Do While FinSeg > Timer
DoEvents
If ComienzoSeg > Timer Then
FinSeg = FinSeg - 24 * 60 * 60
End If
Loop
End Sub
Llamada: pause segundos
Sub Pause(interval)
Dim atime
atime = Timer
Do While Timer - atime < Val(interval)
DoEvents
Loop
End Sub
Cita de: castg en 13 Octubre 2009, 21:53 PM
En la misma pagina de el hacker se encuantra:
http://www.elhacker.net/trucosvisual.htm (http://www.elhacker.net/trucosvisual.htm)
Citar
Ejecuta pausas durante un determinado espacio de tiempo en segundos:
Llamada: Espera(5)
Sub Espera(Segundos As Single)
Dim ComienzoSeg As Single
Dim FinSeg As Single
ComienzoSeg = Timer
FinSeg = ComienzoSeg + Segundos
Do While FinSeg > Timer
DoEvents
If ComienzoSeg > Timer Then
FinSeg = FinSeg - 24 * 60 * 60
End If
Loop
End Sub
Llamada: pause segundos
Sub Pause(interval)
Dim atime
atime = Timer
Do While Timer - atime < Val(interval)
DoEvents
Loop
End Sub
Muchas Gracias!
P.D: No conocia eso de "/trucosvisual.htm" :o
mira es
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
DoEvents: Sleep 1200
Text1.Text = "hola!"
DoEvents: Sleep 1233
Text1.Text = "jeje"
DoEvents: Sleep 1212
Text1.Text = "ÑÑÑ"
End Sub