Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: - en 29 Abril 2007, 13:17 PM
Otro fallo que le veo es que si creamos el archivo licencia.txt sin tener que meter nada dentro lo da como bueno.
CitarPrivate Sub Form_Load()
On Error Resume Next
If Dir("./licencia.txt") <> "" Then
Dim n_File As Integer
Dim Contenido As String
n_File = FreeFile
Open "./licencia.txt" For Input As n_File
Contenido = Input$(LOF(n_File), #n_File)
Close n_File
Text4 = Contenido
End If
If Text4.Text = "VGV4dDE" Then Me.Hide
If Text4.Text = "VGV4dDE" Then programaTrial.Show
End Sub
CitarPrivate Sub savetext1()
Dim canalLibre As Integer
canalLibre = FreeFile
Open "./tiempo.txt" For Output As #canalLibre
Print #canalLibre, Text1
Close #canalLibre
End Sub
Private Sub savetext2()
Dim canalLibre As Integer
canalLibre = FreeFile
Open "./tiempo2.txt" For Output As #canalLibre
Print #canalLibre, Text2
Close #canalLibre
End Sub
Private Sub savetext3()
Dim canalLibre As Integer
canalLibre = FreeFile
Open "./tiempo3.txt" For Output As #canalLibre
Print #canalLibre, Text3
Close #canalLibre
End Sub
Private Sub Form_Load()
Label1.Caption = Text4.Text
Label2.Caption = Text5.Text
Label3.Caption = Text6.Text
cargartxt1
cargartxt2
cargartxt3
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub cargartxt1()
On Error Resume Next
Dim n_File As Integer
Dim Contenido As String
n_File = FreeFile
Open "./tiempo.txt" For Input As n_File
Contenido = Input$(LOF(n_File), #n_File)
Close n_File
Text4 = Contenido
End Sub
Private Sub cargartxt2()
On Error Resume Next
Dim n_File As Integer
Dim Contenido As String
n_File = FreeFile
Open "./tiempo2.txt" For Input As n_File
Contenido = Input$(LOF(n_File), #n_File)
Close n_File
Text5 = Contenido
End Sub
Private Sub cargartxt3()
On Error Resume Next
Dim n_File As Integer
Dim Contenido As String
n_File = FreeFile
Open "./tiempo3.txt" For Input As n_File
Contenido = Input$(LOF(n_File), #n_File)
Close n_File
Text6 = Contenido
End Sub
Private Sub Timer1_Timer()
Label6.Caption = "0"
Label3.Caption = Val(Label3.Caption) + 1
If Val(Label3.Caption) < 10 Then
Label3.Caption = "0" & Label3.Caption
End If
If Val(Label3.Caption) > 59 Then
Label3.Caption = "00"
Label2.Caption = Val(Label2.Caption) + 1
If Val(Label2.Caption) < 10 Then
Label2.Caption = "0" & Label2.Caption
End If
If Val(Label2.Caption) > 59 Then
Label2.Caption = "00"
Label1.Caption = Val(Label1.Caption) + 1
If Val(Label1.Caption) < 10 Then
Label1.Caption = "0" & Label1.Caption
End If
End If
End If
End Sub
Private Sub Timer2_Timer()
Label6.Caption = Val(Label6.Caption) + 1
End Sub
Private Sub Timer3_Timer()
savetext1
savetext2
savetext3
End Sub
Private Sub Timer4_Timer()
Text1.Text = Label1.Caption
Text2.Text = Label2.Caption
Text3.Text = Label3.Caption
End Sub