home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / altd201a.zip / VB30.ARJ / VB30 / EX23VB.FRM < prev    next >
Text File  |  1996-04-19  |  7KB  |  222 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "VB Example 23"
  5.    ClientHeight    =   3930
  6.    ClientLeft      =   2295
  7.    ClientTop       =   1455
  8.    ClientWidth     =   5115
  9.    Height          =   4335
  10.    Left            =   2235
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3930
  13.    ScaleWidth      =   5115
  14.    Top             =   1110
  15.    Width           =   5235
  16.    Begin TextBox FileProgressWindow 
  17.       BackColor       =   &H00C0C0C0&
  18.       BorderStyle     =   0  'None
  19.       Enabled         =   0   'False
  20.       Height          =   375
  21.       Left            =   120
  22.       TabIndex        =   2
  23.       Text            =   "Invisible FileProgressWindow"
  24.       Top             =   2520
  25.       Width           =   615
  26.    End
  27.    Begin TextBox JobProgressWindow 
  28.       BackColor       =   &H00C0C0C0&
  29.       BorderStyle     =   0  'None
  30.       Enabled         =   0   'False
  31.       Height          =   375
  32.       Left            =   240
  33.       TabIndex        =   3
  34.       Text            =   "Invisible JobProgressWindow"
  35.       Top             =   3120
  36.       Width           =   735
  37.    End
  38.    Begin SSPanel Panel3D2 
  39.       BackColor       =   &H00C0C0C0&
  40.       Caption         =   "Panel3D2"
  41.       FloodType       =   1  'Left To Right
  42.       Font3D          =   0  'None
  43.       Height          =   375
  44.       Left            =   2400
  45.       TabIndex        =   14
  46.       Top             =   3120
  47.       Width           =   2535
  48.    End
  49.    Begin SSPanel Panel3D1 
  50.       BackColor       =   &H00C0C0C0&
  51.       Caption         =   "Panel3D1"
  52.       FloodType       =   1  'Left To Right
  53.       Font3D          =   0  'None
  54.       Height          =   375
  55.       Left            =   2400
  56.       TabIndex        =   13
  57.       Top             =   2520
  58.       Width           =   2535
  59.    End
  60.    Begin TextBox InputFiles 
  61.       Height          =   375
  62.       Left            =   2280
  63.       TabIndex        =   12
  64.       Text            =   "Input Files"
  65.       Top             =   720
  66.       Width           =   2415
  67.    End
  68.    Begin TextBox ArchiveName 
  69.       Height          =   375
  70.       Left            =   2280
  71.       TabIndex        =   11
  72.       Text            =   "Archive Name"
  73.       Top             =   240
  74.       Width           =   2415
  75.    End
  76.    Begin CommandButton About 
  77.       Caption         =   "About"
  78.       Height          =   375
  79.       Left            =   3240
  80.       TabIndex        =   10
  81.       Top             =   1320
  82.       Width           =   1335
  83.    End
  84.    Begin CommandButton ExitButton 
  85.       Caption         =   "Exit"
  86.       Height          =   375
  87.       Left            =   1680
  88.       TabIndex        =   9
  89.       Top             =   1320
  90.       Width           =   1335
  91.    End
  92.    Begin TextBox TextWindow 
  93.       BackColor       =   &H00C0C0C0&
  94.       BorderStyle     =   0  'None
  95.       Height          =   495
  96.       Left            =   2640
  97.       TabIndex        =   1
  98.       Text            =   "Text1"
  99.       Top             =   1920
  100.       Width           =   1935
  101.    End
  102.    Begin CommandButton Compress 
  103.       Caption         =   "Compress"
  104.       Height          =   375
  105.       Left            =   120
  106.       TabIndex        =   0
  107.       Top             =   1320
  108.       Width           =   1335
  109.    End
  110.    Begin SSPanel Panel3D3 
  111.       BackColor       =   &H00C0C0C0&
  112.       Font3D          =   0  'None
  113.       Height          =   4815
  114.       Left            =   0
  115.       TabIndex        =   15
  116.       Top             =   0
  117.       Width           =   5175
  118.       Begin Label Label5 
  119.          Alignment       =   1  'Right Justify
  120.          BackStyle       =   0  'Transparent
  121.          Caption         =   "Input Files:"
  122.          Height          =   375
  123.          Left            =   840
  124.          TabIndex        =   4
  125.          Top             =   720
  126.          Width           =   1215
  127.       End
  128.       Begin Label Label4 
  129.          Alignment       =   1  'Right Justify
  130.          BackStyle       =   0  'Transparent
  131.          Caption         =   "Archive Name:"
  132.          Height          =   375
  133.          Left            =   600
  134.          TabIndex        =   5
  135.          Top             =   240
  136.          Width           =   1335
  137.       End
  138.       Begin Label Label3 
  139.          Alignment       =   1  'Right Justify
  140.          BackStyle       =   0  'Transparent
  141.          Caption         =   "Job Percent Complete:"
  142.          Height          =   495
  143.          Left            =   480
  144.          TabIndex        =   8
  145.          Top             =   3120
  146.          Width           =   1815
  147.       End
  148.       Begin Label Label2 
  149.          Alignment       =   1  'Right Justify
  150.          BackStyle       =   0  'Transparent
  151.          Caption         =   "File Percent Complete:"
  152.          Height          =   375
  153.          Left            =   480
  154.          TabIndex        =   7
  155.          Top             =   2520
  156.          Width           =   1815
  157.       End
  158.       Begin Label Label1 
  159.          Alignment       =   1  'Right Justify
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "File Being Compressed:"
  162.          Height          =   375
  163.          Left            =   480
  164.          TabIndex        =   6
  165.          Top             =   1920
  166.          Width           =   1815
  167.       End
  168.    End
  169. End
  170. Dim LibraryHandle As Long
  171.  
  172. Sub About_Click ()
  173.   frmAbout.Text1 = "EX23VB demonstrates the simplified interface.  Compress will add *.FRM"
  174.   frmAbout.Text1 = frmAbout.Text1 + " files to VB00.ZIP."
  175.   frmAbout.Show 1
  176. End Sub
  177.  
  178. Sub Compress_Click ()
  179.     Dim i As Integer
  180.     About.SetFocus
  181.     Compress.Enabled = 0
  182.     ExitButton.Enabled = 0
  183.     i = ALCreate(ArchiveName.Text, InputFiles.Text, 0, TextWindow.hWnd, FileProgressWindow.hWnd, JobProgressWindow.hWnd)
  184.     ExitButton.Enabled = 1
  185.     Compress.Enabled = 1
  186.     Compress.SetFocus
  187. End Sub
  188.  
  189. Sub ExitButton_Click ()
  190.     FreeLibrary (LibraryHandle)
  191.     End
  192. End Sub
  193.  
  194. Sub FileProgressWindow_Change ()
  195.     Panel3D1.FloodPercent = Val(FileProgressWindow.Text)
  196. End Sub
  197.  
  198. Sub Form_Load ()
  199.   ChDrive App.Path
  200.   ChDir App.Path
  201.   LibraryHandle = LoadLibrary(DLLName())
  202.   If LibraryHandle < 32 Then
  203.     InputFiles.Text = "Can't Find DLL!"
  204.   Else
  205.     InputFiles.Text = "*.frm"
  206.   End If
  207.   ArchiveName.Text = "vb00.zip"
  208. End Sub
  209.  
  210. Sub Form_Unload (Cancel As Integer)
  211.   FreeLibrary (LibraryHandle)
  212. End Sub
  213.  
  214. Sub JobProgressWindow_Change ()
  215.     Panel3D2.FloodPercent = Val(JobProgressWindow.Text)
  216. End Sub
  217.  
  218. Sub TextWindow_GotFocus ()
  219.     ExitButton.SetFocus
  220. End Sub
  221.  
  222.