home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Object = "{F79ED619-0A0D-11D2-9F03-F39552419543}#6.0#0"; "zlib15.ocx"
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Zlib StringCompress 1.5 Sample Project"
- ClientHeight = 5700
- ClientLeft = 45
- ClientTop = 615
- ClientWidth = 6030
- Icon = "Form21.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 5700
- ScaleWidth = 6030
- StartUpPosition = 2 'CenterScreen
- Begin MaqZlib20.Zlib Zlib1
- Left = 1920
- Top = 1800
- _ExtentX = 1032
- _ExtentY = 1032
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 1680
- Top = 1800
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Begin VB.CommandButton Command4
- Caption = "Uncompress file"
- Height = 495
- Left = 3480
- TabIndex = 6
- Top = 5040
- Width = 1815
- End
- Begin VB.CommandButton Command3
- Caption = "Compress file"
- Height = 495
- Left = 840
- TabIndex = 5
- Top = 5040
- Width = 1815
- End
- Begin VB.CommandButton Command2
- Caption = "Uncompress string"
- Height = 495
- Left = 3480
- TabIndex = 4
- Top = 4440
- Width = 1815
- End
- Begin VB.CommandButton Command1
- Caption = "Compress string"
- Height = 495
- Left = 840
- TabIndex = 3
- Top = 4440
- Width = 1815
- End
- Begin RichTextLib.RichTextBox RichTextBox3
- Height = 1335
- Left = 120
- TabIndex = 2
- ToolTipText = "Here will apear the reconstructed text"
- Top = 3000
- Width = 5775
- _ExtentX = 10186
- _ExtentY = 2355
- _Version = 327681
- Enabled = -1 'True
- ScrollBars = 2
- TextRTF = $"Form21.frx":0ABA
- End
- Begin RichTextLib.RichTextBox RichTextBox2
- Height = 1335
- Left = 120
- TabIndex = 1
- ToolTipText = "Here the compressed output will apear"
- Top = 1560
- Width = 5775
- _ExtentX = 10186
- _ExtentY = 2355
- _Version = 327681
- Enabled = -1 'True
- ScrollBars = 2
- TextRTF = $"Form21.frx":0B83
- End
- Begin RichTextLib.RichTextBox RichTextBox1
- Height = 1335
- Left = 120
- TabIndex = 0
- ToolTipText = "Type here the text to be compressed"
- Top = 120
- Width = 5775
- _ExtentX = 10186
- _ExtentY = 2355
- _Version = 327681
- Enabled = -1 'True
- ScrollBars = 2
- TextRTF = $"Form21.frx":0C4C
- End
- Begin VB.Menu about
- Caption = "About"
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub about_Click()
- Zlib1.AboutBox
- End Sub
- Private Sub Command1_Click()
- Dim Myinput As String
- Dim Myoutput As String
- Dim Myreturn As Boolean
- Myinput = RichTextBox1.Text
- Myreturn = Zlib1.ZlibCompress(Myinput, Myoutput)
- RichTextBox2.Text = Myoutput
- End Sub
- Private Sub Command2_Click()
- Dim Myinput As String
- Dim Myoutput As String
- Dim Myreturn As Boolean
- Myinput = RichTextBox2.Text
- Myreturn = Zlib1.ZlibUncompress(Myinput, Myoutput)
- RichTextBox3.Text = Myoutput
- End Sub
- Private Sub Command3_Click()
- CommonDialog1.Filter = "All Files (*.*)|*.*"
- CommonDialog1.FilterIndex = 1
- CommonDialog1.ShowOpen
- If CommonDialog1.filename = "" Then Exit Sub
- Dim Myinput As String
- Dim Myoutput As String
- Dim Myreturn As Boolean
- Myinput = CommonDialog1.filename
- CommonDialog1.filename = CommonDialog1.filename & ".gz"
- CommonDialog1.Filter = "All Files (*.*)|*.*"
- CommonDialog1.FilterIndex = 1
- CommonDialog1.ShowSave
- If CommonDialog1.filename = "" Then Exit Sub
- Myoutput = CommonDialog1.filename
- Myreturn = Zlib1.ZlibCompressFile(Myinput, Myoutput, "9")
- End Sub
- Private Sub Command4_Click()
- CommonDialog1.Filter = "All Files (*.*)|*.*"
- CommonDialog1.FilterIndex = 1
- CommonDialog1.ShowOpen
- If CommonDialog1.filename = "" Then Exit Sub
- Dim Myinput As String
- Dim Myoutput As String
- Dim Myreturn As Boolean
- Myinput = CommonDialog1.filename
- CommonDialog1.Filter = "All Files (*.*)|*.*"
- CommonDialog1.FilterIndex = 1
- CommonDialog1.ShowSave
- If CommonDialog1.filename = "" Then Exit Sub
- Myoutput = CommonDialog1.filename
- Myreturn = Zlib1.ZlibUnCompressFile(Myinput, Myoutput)
- End Sub
-