Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Zip / Unzip with 128-bit AES encryption

Download Chilkat 32-bit Zip ActiveX (.msi) (includes objects for .zip, .gz, .bz2, and .Z)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Visual Basic example demonstrating how to Zip and Unzip with 128-bit AES encryption.

' Save an XML file to a 128-bit encrypted Zip
Private Sub Command1_Click()

    Dim zip As New ChilkatZip2
    
    ' Anything works to begin the 30-day trial
    zip.UnlockComponent "30-day trial"
    
    zip.NewZip "hamlet.zip"
    zip.AppendFiles "hamlet.xml", 0
    
    ' Choose 128-bit AES encryption (WinZip compatible)
    zip.Encryption = 4
    zip.EncryptKeyLength = 128
    zip.SetPassword "hamlet"
    
    success = zip.WriteZipAndClose()
    If (success = 0) Then
        MsgBox zip.LastErrorText
    Else
        MsgBox "AES Encrypted Zip Created"
    End If
    
    
End Sub

' Open a 128-bit AES encrypted Zip and inflate the contents.
Private Sub Command2_Click()

    Dim zip As New ChilkatZip2
    
    ' Anything works to begin the 30-day trial
    zip.UnlockComponent "30-day trial"
    
    ' We can only open it if the password is correct.
    zip.SetPassword "hamlet"
    success = zip.OpenZip("hamlet.zip")
    If (success = 0) Then
        MsgBox zip.LastErrorText
        Exit Sub
    End If
        
    ' The data is automatically decrypted when it is accessed.
    Dim e As ChilkatZipEntry2
    Set e = zip.GetEntryByIndex(0)
    Text1.Text = e.InflateToString(1)
    
    zip.CloseZip
    
End Sub


 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.