home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipComp.exe / XceedZip.Cab / F112539_Sample.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-11-15  |  945 b   |  43 lines

  1. unit Sample;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   OleCtrls, XceedZipLib_TLB, StdCtrls;
  8.  
  9. type
  10.   TfrmSample = class(TForm)
  11.     btGo: TButton;
  12.     xZip: TXceedZip;
  13.     procedure btGoClick(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   frmSample: TfrmSample;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TfrmSample.btGoClick(Sender: TObject);
  28. var
  29.   xErr : xcdError;
  30. begin
  31.   { This sample code is only intended to show that even if this application
  32.     uses the XceedZip control, the DLL can be registered at run-time just
  33.     before any form that uses the control is displayed }
  34.   xZip.ZipFilename        := 'c:\test.zip';
  35.   xZip.FilesToProcess     := 'c:\*.sys';
  36.   xZip.ProcessSubfolders  := false;
  37.  
  38.   xErr  := xZip.Zip;
  39.   ShowMessage( xZip.GetErrorDescription( xvtError, xErr ) );
  40. end;
  41.  
  42. end.
  43.