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

 

 

 

 

 

 

 

Load JPG, Extract XMP and Save as XML

Download Chilkat XML ActiveX

Loads a JPG with XMP metadata and extracts the 1st XMP document and saves it to a .xml file.

Private Sub Command1_Click()
    ' Add references to these ActiveX components in your VB6 project:
    ' Chilkat XML
    ' Chilkat XMP
    ' The ChilkatXmpDude1.jpg test JPG can be downloaded from
    ' http://www.chilkatsoft.com/testData/ChilkatXmpDude1.jpg

    ' Create an instance of the XMP ActiveX and unlock it.
    Dim xmp As New ChilkatXmp
    success = xmp.UnlockComponent("anything for 30 day trial")
    If (success = 0) Then
        MsgBox "Failed to unlock"
        Exit Sub
    End If
    
    ' Load a JPG file.
    success = xmp.LoadAppFile("chilkatXmpDude1.jpg")
     If (success = 0) Then
        MsgBox xmp.LastErrorText
        Exit Sub
    End If
   
    ' Show how many XMP documents are embedded within this JPG
    MsgBox "Number of embedded XMP docs = " + Str(xmp.NumEmbedded)
   
    ' Get the 1st embedded XMP
    ' The sample JPG has only 1 embedded XMP anyway...
    Dim xml As ChilkatXml
    Set xml = xmp.GetEmbedded(0)
    If Not (xml Is Nothing) Then
        ' Save the XML to a file.
        xml.SaveXml "xmpDoc.xml"
    Else
        MsgBox xmp.LastErrorText
    End If
   
End Sub

 

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