|
-
Nov 26th, 2000, 04:26 PM
#4
Thread Starter
Addicted Member
Here's my Code.
Thank's YoungBuck for the idea of how to do it.
Public Key As Variant
Public ZipedText As String
Private Sub mnuOpen_Click()
Dim lenKey As Integer
FileName = ShowFileDialog(Me.hWnd)
Open FileName For Input As 1
Input #1, lenKey
ReDim Key(lenKey)
Do
r = r + 1
DoEvents
Input #1, Key(r)
If Key(r) = "End Array" Then
Exit Do
Else
End If
Loop
Do While Not EOF(1)
Input #1, zipedtxt
ZipedText = ZipedText + zipedtxt
Loop
Text1.text = unZip(ZipedText, Key)
Close
End Sub
Private Sub mnuSave_Click()
Key = Zip(Text1.text, ZipedText)
FileName = ShowFileDialog(Me.hWnd)
FileName = FileName & ".txt"
Open FileName For Output As 1
Write #1, UBound(Key)
For i = 1 To UBound(Key)
r = r + 1
If Key(r) = "" Then
Write #1, "End Array"
Exit For
End If
Write #1, Key(r)
Next
Write #1, ZipedText
Close
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|