home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Compression Demo"
- ClientHeight = 4725
- ClientLeft = 1560
- ClientTop = 1800
- ClientWidth = 6705
- Height = 5130
- Left = 1500
- LinkTopic = "Form1"
- ScaleHeight = 4725
- ScaleWidth = 6705
- Top = 1455
- Width = 6825
- Begin VB.TextBox Text2
- Height = 285
- Left = 3000
- TabIndex = 6
- Text = "NewFile"
- Top = 4320
- Width = 2295
- End
- Begin VB.CommandButton Command2
- Caption = "Uncompress"
- Height = 255
- Left = 5400
- TabIndex = 5
- Top = 4320
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "Compress"
- Height = 255
- Left = 5400
- TabIndex = 4
- Top = 4020
- Width = 1215
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 3000
- TabIndex = 3
- Text = "Compact.cmp"
- Top = 3960
- Width = 2295
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 780
- TabIndex = 2
- Top = 3600
- Width = 2655
- End
- Begin VB.FileListBox File1
- Height = 2760
- Left = 3660
- TabIndex = 1
- Top = 720
- Width = 2295
- End
- Begin VB.DirListBox Dir1
- Height = 2730
- Left = 780
- TabIndex = 0
- Top = 720
- Width = 2655
- End
- Begin VB.Label Label3
- Caption = "File to Compress"
- Height = 195
- Left = 4020
- TabIndex = 9
- Top = 480
- Width = 1635
- End
- Begin VB.Label Label2
- Caption = "UnCompress To:"
- Height = 255
- Left = 1680
- TabIndex = 8
- Top = 4320
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Compress To:"
- Height = 255
- Left = 1680
- TabIndex = 7
- Top = 3960
- Width = 975
- End
- Begin CompactLibCtl.Compact Compact1
- Left = 0
- Top = 4680
- _version = 65536
- _extentx = 2143
- _extenty = 873
- _stockprops = 0
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- DefInt A-Z
- Private Sub Command1_Click()
- Dim FileName As String
- Dim TempBuffer As String
- TempBuffer = Dir1.Path
- If Right$(TempBuffer, 1) <> "\" Then TempBuffer = TempBuffer + "\"
- If File1.ListIndex >= 0 Then
- FileName = TempBuffer + File1.List(File1.ListIndex)
- With Compact1
- .SetMousePointer = True
- .OutFile = Text1.Text
- .FileName = FileName
- End With
- MsgBox ("Compression complete!")
- End If
- End Sub
- Private Sub Command2_Click()
- Dim FileName As String
- Dim TempBuffer As String
- TempBuffer = Dir1.Path
- If Right$(TempBuffer, 1) <> "\" Then TempBuffer = TempBuffer + "\"
- If File1.ListIndex >= 0 Then
- FileName = TempBuffer + File1.List(File1.ListIndex)
- With Compact1
- .SetMousePointer = True
- .NewFilename = Text2.Text
- .CompressedFilename = FileName
- End With
- MsgBox ("UnCompression complete!")
- End If
- End Sub
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- Dir1.Path = Drive1.Drive
- End Sub
- Private Sub Form_Load()
- Show
- End Sub
-