Xceed Zip Compression Library Documentation
Getting Started Sample App for Visual FoxPro
Sample applications > Visual FoxPro > Getting Started Sample App for Visual FoxPro

You can find the Getting Started Sample Application for Visual FoxPro 6 in:

SAMPLES\VISUAL FOXPRO 6\GETTINGSTARTED

This sample application provides a very basic visual interface that allows a user to create (and add to) zip files, to unzip the contents of an already existing zip file, and to list the contents of a zip file.

The sample demonstrates the Zip, Unzip and ListZipContents methods, as well as the following events:

When creating a new zip file, the "Zip filename" text box (txtZipFile) must be filled with the name of the zip file that you want to create as well as its location (path). You must also specify which files you want to put in the zip file by filling in the "Files to process" text box (txtFiles). For example:

Set the Zip filename field to "a:\Zipfile.zip"

Set the Files to process field to "c:\*.bat"

Once you have selected the Zip filename and the files you want to process, you click on the "Zip" button and the zip file will be created. You can see which files were zipped in the main list box and the files that are being skipped in the smaller list box (lstWarning).

When unzipping, the sample application also allows you to select which files to unzip. So be careful what you put in the Files to process field before you click on the unzip button. You will also need to specify the folder where you want to unzip your files to in the field represented by the txtUnzipToFolder text box. For example:

Set the Zip filename field to "a:\Zipfile.zip"

Set the Unzip to folder field to "c:\"

Click on the "Unzip" button to unzip the files. You can see which files are being unzipped in the main list box. To view the contents of a zip file, the sample uses the ListZipContents method and receives information on the files being listed by the ListingFile event. To use the sample's list feature, simply specify the zip file name you want to list and click on "List". This will show you all the files contained in the zip file you specified, as well as some selected information about each file.

Last but not least, you can choose to abort the current operation at any time by clicking on the "Abort" button. Clicking the button sets Xceed Zip's Abort property to True.

To use the sample, load the FRMSTARTED.SCX form, then run it.