#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private BtnUnzip As Button
Private BtnZip As Button
Public Arc As Archiver
Public Destination As String = "d:\zipped\unzip"
Public Source As String = "d:\zipped\zip"
Public ZipSource As String = "d:\zipped\unzip\images"
Public ZipFile As String = ""
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Form1") 'Load the layout file.
MainForm.Show
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub BtnUnzip_Click
Arc.UnZip(Source, "images.zip", Destination, Null)
End Sub
Sub BtnZip_Click
Dim FilesToZip(2) As String
FilesToZip(0) = "image1.png"
FilesToZip(1) = "image2.png"
Arc.ZipFiles(ZipSource, FilesToZip, Source, "newzip.zip", Null)
' Zip a folder
'Arc.ZipFolder(Destination, Source, "myzip.zip", Null)
End Sub