Académique Documents
Professionnel Documents
Culture Documents
5 C NRO 15
MODULO 6
OptionExplicit
Sub Pausa(Segundos As Double)
Dim inicio As Double
'Devuelve la cantidad de
segundos desde que
inicio windows
inicio = Timer
Do While (Timer - inicio)
< Segundos
'pausa
DoEvents
Loop
End Sub
FABRICIO LOPEZ
ARENAS
Private Sub
Command1_Click()
Dim texto As String
texto = "...Hola Mundo--->>>"
CallMostrarTexto(texto, 0.1, Me)
End Sub
Private Sub MostrarTexto(Frase As String, Segundos As Double, Destino As
Object)
Dim LenFrase As Integer
Dim i As Integer
Dim Caracter As String
Dim texto As String
LenFrase = Len(Frase)
Do While i <= LenFrase
5 C NRO 15
Destino.Cls
DoEvents
i=i+1
'Obtiene el siguiente
caracter
Caracter = Mid(Frase, i, 1)
'texto actual
texto = texto &Caracter
Destino.Print texto 'Imprimi
e/ dibuja el texto
'pausa o delay
Pausa Segundos
DoEvents
Loop
End Sub
Private Sub Form_Load()
Me.FontSize = 12
Me.FontBold = True
Me.ForeColor = vbRed
Command1.Caption = "Efecto de texto con mid"
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
FABRICIO LOPEZ
ARENAS
5 C NRO 15
MODIULO NRO 7
FABRICIO
LOPEZ
ARENAS
End Sub
Private Sub
Option2_Click()
Me.Caption = FormatDateTime(Now, vbLongDate)
End Sub
Private Sub Option3_Click()
Me.Caption =
FormatDateTime(Now,
vbShortDate)
End Sub
Private Sub Option4_Click()
Me.Caption =
FormatDateTime(Now,
vbLongTime)
End Sub
Private Sub Option5_Click()
Me.Caption = FormatDateTime(Now, vbShortTime)
End Sub
FABRICIO
LOPEZ
ARENAS
5 C NRO 15
MODULO NRO 8
5 C NRO 15
FABRICIO LOPEZ
ARENAS