07/06/08 14:25
GrG
Nel Modulo:
nel form (con command1):
Public Inizio(1 To 99999) As String Public i As Integer Dim X As Integer Dim Lon As Integer Dim d() As String Public B As Integer Public TestoCriptato As String Public TestoDecriptato As String Public Sub Apri(Path As String, Testo As TextBox) On Error Resume Next Testo.Text = "" Open Path For Input As #1 Do i = i + 1 Line Input #1, Inizio(i) Decripta (Inizio(i)) Inizio(i) = Module1.TestoDecriptato Testo.Text = Testo.Text & Inizio(i) Loop Until EOF(1) = True Close #1 End Sub Public Function Cripta(Testo As String) For X = 1 To Len(Testo) TestoCriptato = TestoCriptato & ":" & (Asc(Testo) * 13) Lon = Len(Testo) Testo = Right(Testo, (Lon - 1)) Next X Lon = Len(TestoCriptato) TestoCriptato = Right(TestoCriptato, (Lon - 1)) End Function Public Function Decripta(Testo As String) On Error GoTo ErrD d = Split(Testo, ":") B = -1 For B = B + 1 To Len(Testo) TestoDecriptato = TestoDecriptato & Chr(d(B) \ 13) Next B ErrD: End Function
nel form (con command1):
Private Sub Command1_Click() Apri App.Path & "\Note.dat", Text1 End Sub Private Sub Form_Load() Apri App.Path & "\Note.dat", Text1 Module1.i = 0 Module1.B = -1 End Sub
aaa