Xceed Zip Compression Library Documentation
Formless use of the control
Xceed Zip control reference > Formless use of the control

You can instantiate the ActiveX control without putting it on a form. To do this, make the control available in your development environment (this should already have been done if you followed the installation instructions) and simply create an instance of the object like you would any other variable. The object's type is "XceedZip".

Visual Basic Copy Code

' Make sure you added the Xceed Zip control to your object references. To do this, go to the Project
'menu and select the "References..." menu item, and then checkmark the Xceed Zip Compression Library v5.0
'entry in the list of components. 

' Here we define the type for our variables. m_XceedZip1 should be
' global to your form.

Dim WithEvents m_XceedZip1 As XceedZip
Dim ResultCode1 As Integer 

' Now we instantiate the variable with an Xceed Zip control instance
Set m_XceedZip1 = New XceedZip 

' And now we can work as usual... 
m_XceedZip1.ZipFilename = "c:\temp\zipfile1.zip"
m_XceedZip1.FilesToProcess = "c:\temp\folder1\*"

ResultCode1 = m_XceedZip1.Zip

'...

VoxPro Copy Code

PRIVATE ResultCode && integer 

&& This technique does not allow you to capture events.
&& The result code, however, is accessible. 

&& Here we create an Xceed Zip object called xZip
XceedZip1 = CreateObject("XceedSoftware.XceedZip.4")  

&& And now we can work as usual
XceedZip1.ZipFilename = "c:\temp\zipfile1.zip"
XceedZip1.FilesToProcess = "C:\*" 

ResultCode = XceedZip1.Zip

&&...

Example for Visual C++ MFC:

A sample application is included for Visual C++ MFC users that demonstrates formless use of the component.