Hola amigos David el grande y Avellaneda.
He programado lo siguiente:
Código:
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim texto As String
texto = Chr(KeyAscii)
' si el texto llega al margen derecho del form, nueva línea
If Me.CurrentX >= Me.ScaleWidth - 90 Then Me.Print Chr(13)
Me.Print texto;
End Sub
Private Sub Form_Load()
Close
Open "Prueba.txt" For Binary As #1
TextFile = Input(LOF(1), 1)
Close
Me.Print TextFile
End Sub
Private Sub Form_Unload(Cancel As Integer)
' si no existe Prueba.txt, lo crea y si existe lo sobreescribe
Open App.Path & "\Prueba.txt" For Output As #1
Print #1, s
Close #1
End Sub
y me guarda los archivos en el directorio de la aplicacion pero sin texto alguno del que escribo. ¿Podeis ayudarme?.