Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Create a Zip File
How to create a Zip archive in Visual Basic .NET ' Simple example to create a Zip file in VB.NET Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim zip As New Chilkat.Zip() ' Anything begins the 30-day trial Dim unlocked As Boolean unlocked = zip.UnlockComponent("30-day trial") If (Not unlocked) Then MsgBox(zip.LastErrorText) Exit Sub End If zip.NewZip("test.zip") ' Append a directory tree. This simply adds disk file references ' to the Zip object. No Zip is created at this point. Dim success As Boolean success = zip.AppendFiles("tree", True) If (Not success) Then MsgBox(zip.LastErrorText) Exit Sub End If ' Write test.zip success = zip.WriteZipAndClose() If (Not success) Then MsgBox(zip.LastErrorText) Else MsgBox("Zip created!") End If End Sub Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.