home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Windows 95 Special 2 / WIN95_2.bin / utils / envelop / envelop.6 / Tools / Bootcamp / basic / filelist / filelist.eto < prev    next >
Encoding:
Text File  |  1996-07-08  |  3.1 KB  |  106 lines

  1. Type FileListBoxMasterForm From SampleMasterForm
  2.   Dim Label1 As New Label
  3.   Dim Label2 As New Label
  4.   Dim Label3 As New Label
  5.   Dim lblPath As New Label
  6.   Dim Label5 As New Label
  7.   Dim cboDrives As New FileComboBox
  8.   Dim lstDirectory As New FileListBox
  9.   Dim lstFiles As New FileListBox
  10.  
  11.   ' METHODS for object: FileListBoxMasterForm
  12.   Sub cboDrives_Click()
  13.     ' Go to the selected drive/directory
  14.     DisplayDir(cboDrives.SelPath)
  15.   End Sub
  16.  
  17.   Sub DisplayDir(ByVal dir As String)
  18.     ' Setting list directory path has the side effect of
  19.     ' resetting the lstDirectory.SelPath to ""
  20.     ' Since DisplayDir is called sending this value, we need
  21.     ' to use ByVal to explicitly copy the SelPath value.
  22.     lstDirectory.Path = dir
  23.     lstFiles.Path = dir
  24.     cboDrives.SelectDrive(lstDirectory.Path)
  25.     lblPath.Text = lstDirectory.Path
  26.   End Sub
  27.  
  28.   Sub lstDirectory_DblClick()
  29.     ' Go to the selected directory
  30.     DisplayDir(lstDirectory.SelPath)
  31.   End Sub
  32.  
  33.   Sub ResetApplication_Click
  34.     ' Preset the height of the combo drive box
  35.     cboDrives.Height = 1500
  36.   
  37.     ' Preset the filter for the file list
  38.     lstFiles.Filter = "*.*"
  39.   
  40.     ' Go to the current working directory.
  41.     DisplayDir(Directory.CurrentDir)
  42.   End Sub
  43.  
  44. End Type
  45.  
  46. Begin Code
  47. ' Reconstruction commands for object: FileListBoxMasterForm
  48. '
  49.   With FileListBoxMasterForm
  50.     .Caption := "File ListBox Demonstration"
  51.     .Move(4500, 1725, 6945, 4380)
  52.     .SampleDir := "C:\ENVELOP\bootcamp\basic\filelist\"
  53.     .SampleName := "FILELIST"
  54.     With .Label1
  55.       .Caption := "Drives:"
  56.       .ForeColor := 13107200
  57.       .ZOrder := 1
  58.       .Move(450, 150, 900, 300)
  59.     End With  'FileListBoxMasterForm.Label1
  60.     With .Label2
  61.       .Caption := "Directories:"
  62.       .ForeColor := 13107200
  63.       .ZOrder := 2
  64.       .Move(2250, 150, 1200, 300)
  65.     End With  'FileListBoxMasterForm.Label2
  66.     With .Label3
  67.       .Caption := "Files:"
  68.       .ForeColor := 13107200
  69.       .ZOrder := 3
  70.       .Move(4650, 150, 600, 300)
  71.     End With  'FileListBoxMasterForm.Label3
  72.     With .lblPath
  73.       .ZOrder := 4
  74.       .Move(600, 3150, 6000, 300)
  75.     End With  'FileListBoxMasterForm.lblPath
  76.     With .Label5
  77.       .Caption := "Path:"
  78.       .ForeColor := 13107200
  79.       .ZOrder := 5
  80.       .Move(300, 2700, 1800, 300)
  81.     End With  'FileListBoxMasterForm.Label5
  82.     With .cboDrives
  83.       .ZOrder := 6
  84.       .Move(450, 600, 1500, 360)
  85.       .ShowDrives := True
  86.       .ShowFiles := False
  87.     End With  'FileListBoxMasterForm.cboDrives
  88.     With .lstDirectory
  89.       .ZOrder := 7
  90.       .Move(2220, 570, 2115, 1950)
  91.       .Path := "C:\envelop\bootcamp\basic\filelist"
  92.       .ShowDirs := True
  93.       .ShowFiles := False
  94.     End With  'FileListBoxMasterForm.lstDirectory
  95.     With .lstFiles
  96.       .ZOrder := 8
  97.       .Move(4620, 570, 1980, 1950)
  98.       .Path := "C:\envelop\bootcamp\basic\filelist"
  99.       .Filter := "*.*"
  100.     End With  'FileListBoxMasterForm.lstFiles
  101.     With .helpfile
  102.       .FileName := "C:\ENVELOP\bootcamp\basic\filelist\FILELIST.hlp"
  103.     End With  'FileListBoxMasterForm.helpfile
  104.   End With  'FileListBoxMasterForm
  105. End Code
  106.