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

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "VB Example 23"
  4.    ClientHeight    =   4140
  5.    ClientLeft      =   1605
  6.    ClientTop       =   1650
  7.    ClientWidth     =   5115
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   1
  11.       weight          =   700
  12.       size            =   8.25
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    Height          =   4545
  18.    Left            =   1545
  19.    LinkTopic       =   "Form1"
  20.    ScaleHeight     =   4140
  21.    ScaleWidth      =   5115
  22.    Top             =   1305
  23.    Width           =   5235
  24.    Begin VB.TextBox InputFiles 
  25.       Height          =   375
  26.       Left            =   1680
  27.       TabIndex        =   12
  28.       Text            =   "Input Files"
  29.       Top             =   720
  30.       Width           =   3015
  31.    End
  32.    Begin VB.TextBox ArchiveName 
  33.       Height          =   375
  34.       Left            =   1680
  35.       TabIndex        =   11
  36.       Text            =   "Archive Name"
  37.       Top             =   240
  38.       Width           =   3015
  39.    End
  40.    Begin VB.CommandButton About 
  41.       Caption         =   "About"
  42.       BeginProperty Font 
  43.          name            =   "MS Sans Serif"
  44.          charset         =   1
  45.          weight          =   400
  46.          size            =   8.25
  47.          underline       =   0   'False
  48.          italic          =   0   'False
  49.          strikethrough   =   0   'False
  50.       EndProperty
  51.       Height          =   375
  52.       Left            =   3240
  53.       TabIndex        =   10
  54.       Top             =   1320
  55.       Width           =   1335
  56.    End
  57.    Begin VB.CommandButton ExitButton 
  58.       Caption         =   "Exit"
  59.       BeginProperty Font 
  60.          name            =   "MS Sans Serif"
  61.          charset         =   1
  62.          weight          =   400
  63.          size            =   8.25
  64.          underline       =   0   'False
  65.          italic          =   0   'False
  66.          strikethrough   =   0   'False
  67.       EndProperty
  68.       Height          =   375
  69.       Left            =   1680
  70.       TabIndex        =   9
  71.       Top             =   1320
  72.       Width           =   1335
  73.    End
  74.    Begin VB.TextBox JobProgressWindow 
  75.       BackColor       =   &H00C0C0C0&
  76.       BorderStyle     =   0  'None
  77.       Enabled         =   0   'False
  78.       BeginProperty Font 
  79.          name            =   "MS Sans Serif"
  80.          charset         =   1
  81.          weight          =   400
  82.          size            =   8.25
  83.          underline       =   0   'False
  84.          italic          =   0   'False
  85.          strikethrough   =   0   'False
  86.       EndProperty
  87.       Height          =   375
  88.       Left            =   2880
  89.       TabIndex        =   3
  90.       Text            =   "JobProgressWindow"
  91.       Top             =   3120
  92.       Visible         =   0   'False
  93.       Width           =   1935
  94.    End
  95.    Begin VB.TextBox FileProgressWindow 
  96.       Appearance      =   0  'Flat
  97.       BackColor       =   &H00C0C0C0&
  98.       BorderStyle     =   0  'None
  99.       Enabled         =   0   'False
  100.       BeginProperty Font 
  101.          name            =   "MS Sans Serif"
  102.          charset         =   1
  103.          weight          =   400
  104.          size            =   8.25
  105.          underline       =   0   'False
  106.          italic          =   0   'False
  107.          strikethrough   =   0   'False
  108.       EndProperty
  109.       Height          =   375
  110.       Left            =   2880
  111.       TabIndex        =   2
  112.       Text            =   "FileProgressWindow"
  113.       Top             =   2520
  114.       Visible         =   0   'False
  115.       Width           =   1935
  116.    End
  117.    Begin VB.TextBox TextWindow 
  118.       Appearance      =   0  'Flat
  119.       BackColor       =   &H00C0C0C0&
  120.       BorderStyle     =   0  'None
  121.       Height          =   495
  122.       Left            =   2640
  123.       TabIndex        =   1
  124.       Text            =   "Text1"
  125.       Top             =   1920
  126.       Width           =   1935
  127.    End
  128.    Begin VB.CommandButton Compress 
  129.       Caption         =   "Compress"
  130.       BeginProperty Font 
  131.          name            =   "MS Sans Serif"
  132.          charset         =   1
  133.          weight          =   400
  134.          size            =   8.25
  135.          underline       =   0   'False
  136.          italic          =   0   'False
  137.          strikethrough   =   0   'False
  138.       EndProperty
  139.       Height          =   375
  140.       Left            =   120
  141.       TabIndex        =   0
  142.       Top             =   1320
  143.       Width           =   1335
  144.    End
  145.    Begin Threed.SSPanel SSPanel1 
  146.       Height          =   495
  147.       Left            =   2640
  148.       TabIndex        =   4
  149.       Top             =   2520
  150.       Width           =   1935
  151.       _version        =   65536
  152.       _extentx        =   3413
  153.       _extenty        =   873
  154.       _stockprops     =   15
  155.       caption         =   "FileProgressGauge"
  156.       backcolor       =   12632256
  157.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  158.          name            =   "MS Sans Serif"
  159.          charset         =   1
  160.          weight          =   400
  161.          size            =   8.25
  162.          underline       =   0   'False
  163.          italic          =   0   'False
  164.          strikethrough   =   0   'False
  165.       EndProperty
  166.       floodtype       =   1
  167.    End
  168.    Begin Threed.SSPanel SSPanel2 
  169.       Height          =   495
  170.       Left            =   2640
  171.       TabIndex        =   5
  172.       Top             =   3120
  173.       Width           =   1935
  174.       _version        =   65536
  175.       _extentx        =   3413
  176.       _extenty        =   873
  177.       _stockprops     =   15
  178.       caption         =   "JobProgressGauge"
  179.       backcolor       =   12632256
  180.       BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  181.          name            =   "MS Sans Serif"
  182.          charset         =   1
  183.          weight          =   400
  184.          size            =   8.25
  185.          underline       =   0   'False
  186.          italic          =   0   'False
  187.          strikethrough   =   0   'False
  188.       EndProperty
  189.       floodtype       =   1
  190.    End
  191.    Begin VB.Label Label5 
  192.       Alignment       =   1  'Right Justify
  193.       Caption         =   "Input Files:"
  194.       BeginProperty Font 
  195.          name            =   "MS Sans Serif"
  196.          charset         =   1
  197.          weight          =   400
  198.          size            =   8.25
  199.          underline       =   0   'False
  200.          italic          =   0   'False
  201.          strikethrough   =   0   'False
  202.       EndProperty
  203.       Height          =   375
  204.       Left            =   240
  205.       TabIndex        =   14
  206.       Top             =   720
  207.       Width           =   1215
  208.    End
  209.    Begin VB.Label Label4 
  210.       Alignment       =   1  'Right Justify
  211.       Caption         =   "Archive Name:"
  212.       BeginProperty Font 
  213.          name            =   "MS Sans Serif"
  214.          charset         =   1
  215.          weight          =   400
  216.          size            =   8.25
  217.          underline       =   0   'False
  218.          italic          =   0   'False
  219.          strikethrough   =   0   'False
  220.       EndProperty
  221.       Height          =   375
  222.       Left            =   120
  223.       TabIndex        =   13
  224.       Top             =   240
  225.       Width           =   1215
  226.    End
  227.    Begin VB.Label Label3 
  228.       Alignment       =   1  'Right Justify
  229.       Caption         =   "Job Percent Complete:"
  230.       BeginProperty Font 
  231.          name            =   "MS Sans Serif"
  232.          charset         =   1
  233.          weight          =   400
  234.          size            =   8.25
  235.          underline       =   0   'False
  236.          italic          =   0   'False
  237.          strikethrough   =   0   'False
  238.       EndProperty
  239.       Height          =   495
  240.       Left            =   480
  241.       TabIndex        =   8
  242.       Top             =   3120
  243.       Width           =   1815
  244.    End
  245.    Begin VB.Label Label2 
  246.       Alignment       =   1  'Right Justify
  247.       Caption         =   "File Percent Complete:"
  248.       BeginProperty Font 
  249.          name            =   "MS Sans Serif"
  250.          charset         =   1
  251.          weight          =   400
  252.          size            =   8.25
  253.          underline       =   0   'False
  254.          italic          =   0   'False
  255.          strikethrough   =   0   'False
  256.       EndProperty
  257.       Height          =   375
  258.       Left            =   480
  259.       TabIndex        =   7
  260.       Top             =   2520
  261.       Width           =   1815
  262.    End
  263.    Begin VB.Label Label1 
  264.       Alignment       =   1  'Right Justify
  265.       Caption         =   "File Being Compressed:"
  266.       BeginProperty Font 
  267.          name            =   "MS Sans Serif"
  268.          charset         =   1
  269.          weight          =   400
  270.          size            =   8.25
  271.          underline       =   0   'False
  272.          italic          =   0   'False
  273.          strikethrough   =   0   'False
  274.       EndProperty
  275.       Height          =   375
  276.       Left            =   480
  277.       TabIndex        =   6
  278.       Top             =   1920
  279.       Width           =   1815
  280.    End
  281. End
  282. Attribute VB_Name = "Form1"
  283. Attribute VB_Creatable = False
  284. Attribute VB_Exposed = False
  285. Dim LibraryHandle As Long
  286.  
  287. Private Sub About_Click()
  288.   frmAbout.Text1 = "EX23VB demonstrates the simplified interface.  Compress will add INPUT*.DAT"
  289.   frmAbout.Text1 = frmAbout.Text1 + " files to VB00.ZIP."
  290.   frmAbout.Show 1
  291. End Sub
  292.  
  293.  
  294. Private Sub Compress_Click()
  295.     Dim i As Integer
  296.     About.SetFocus
  297.     Compress.Enabled = 0
  298.     ExitButton.Enabled = 0
  299.     i = ALCreate(ArchiveName.text, InputFiles.text, 0, TextWindow.hWnd, FileProgressWindow.hWnd, JobProgressWindow.hWnd)
  300.     ExitButton.Enabled = 1
  301.     Compress.Enabled = 1
  302.     Compress.SetFocus
  303. End Sub
  304.  
  305.  
  306. Private Sub ExitButton_Click()
  307.     FreeLibrary (LibraryHandle)
  308.     End
  309. End Sub
  310.  
  311.  
  312. Private Sub FileProgressWindow_Change()
  313.     SSPanel1.FloodPercent = Val(FileProgressWindow.text)
  314. End Sub
  315.  
  316. Private Sub Form_Load()
  317.   ChDrive App.Path
  318.   ChDir App.Path
  319.   LibraryHandle = LoadLibrary(DLLName)
  320.   If LibraryHandle < 32 Then
  321.     InputFiles.text = "**Error Loading " + DLLName + "**"
  322.   Else
  323.     InputFiles.text = "*.frm, *.dat"
  324.   End If
  325.   ArchiveName.text = "vb00.zip"
  326. End Sub
  327.  
  328.  
  329. Private Sub Form_Unload(Cancel As Integer)
  330.   FreeLibrary (LibraryHandle)
  331. End Sub
  332.  
  333.  
  334. Private Sub JobProgressWindow_Change()
  335.     SSPanel2.FloodPercent = Val(JobProgressWindow.text)
  336. End Sub
  337.  
  338.  
  339. Private Sub TextWindow_GotFocus()
  340.     ExitButton.SetFocus
  341. End Sub
  342.  
  343.  
  344.