home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / nivb_src / seldir.frm < prev    next >
Text File  |  1993-06-02  |  4KB  |  140 lines

  1. VERSION 2.00
  2. Begin Form SelectDirForm 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Select Directory"
  5.    ControlBox      =   0   'False
  6.    FontBold        =   -1  'True
  7.    FontItalic      =   0   'False
  8.    FontName        =   "System"
  9.    FontSize        =   9.75
  10.    FontStrikethru  =   0   'False
  11.    FontUnderline   =   0   'False
  12.    Height          =   4575
  13.    Icon            =   0
  14.    Left            =   1875
  15.    LinkMode        =   1  'Source
  16.    LinkTopic       =   "Form1"
  17.    MaxButton       =   0   'False
  18.    MinButton       =   0   'False
  19.    ScaleHeight     =   4170
  20.    ScaleWidth      =   4455
  21.    Top             =   1320
  22.    Width           =   4575
  23.    Begin CommandButton GetDirButton 
  24.       Caption         =   "&Get Dir Info"
  25.       Height          =   495
  26.       Left            =   3000
  27.       TabIndex        =   6
  28.       Top             =   2160
  29.       Width           =   1215
  30.    End
  31.    Begin DriveListBox DriveBox 
  32.       Height          =   315
  33.       Left            =   255
  34.       TabIndex        =   4
  35.       Top             =   3735
  36.       Width           =   2475
  37.    End
  38.    Begin CommandButton CancelButton 
  39.       Cancel          =   -1  'True
  40.       Caption         =   "&Cancel"
  41.       Height          =   465
  42.       Left            =   3000
  43.       TabIndex        =   7
  44.       Top             =   2880
  45.       Width           =   1215
  46.    End
  47.    Begin CommandButton OKButton 
  48.       Caption         =   "Change &Dir"
  49.       Default         =   -1  'True
  50.       Height          =   465
  51.       Left            =   3000
  52.       TabIndex        =   5
  53.       Top             =   1440
  54.       Width           =   1245
  55.    End
  56.    Begin DirListBox DirBox 
  57.       Height          =   1830
  58.       Left            =   270
  59.       TabIndex        =   2
  60.       Top             =   1485
  61.       Width           =   2460
  62.    End
  63.    Begin Label Label1 
  64.       Caption         =   "Current directory:"
  65.       Height          =   255
  66.       Left            =   240
  67.       TabIndex        =   8
  68.       Top             =   720
  69.       Width           =   1815
  70.    End
  71.    Begin Label Label3 
  72.       Caption         =   "Dri&ves:"
  73.       Height          =   255
  74.       Left            =   195
  75.       TabIndex        =   3
  76.       Top             =   3450
  77.       Width           =   765
  78.    End
  79.    Begin Label CurrDirLabel 
  80.       Caption         =   "---"
  81.       Height          =   225
  82.       Left            =   255
  83.       TabIndex        =   1
  84.       Top             =   1080
  85.       Width           =   3960
  86.    End
  87.    Begin Label Label2 
  88.       Caption         =   "Select a directory, then  click Get Dir Info to get information about it."
  89.       Height          =   495
  90.       Left            =   240
  91.       TabIndex        =   0
  92.       Top             =   120
  93.       Width           =   3615
  94.    End
  95. End
  96.  
  97. Sub CancelButton_Click ()
  98.     
  99.     Unload SelectDirForm
  100.  
  101. End Sub
  102.  
  103. Sub DirBox_Change ()
  104.     
  105.     ' propogate directory changes to other controls
  106.     CurrDirLabel.Caption = DirBox.Path
  107.     ChDir DirBox.Path
  108.  
  109. End Sub
  110.  
  111. Sub DirBox_Click ()
  112.     DirBox_Change
  113. End Sub
  114.  
  115. Sub DriveBox_Change ()
  116.  
  117.     ' change the DirBox control path, it will
  118.     ' pass the change on to the FileListBox control
  119.     DirBox.Path = DriveBox.Drive
  120.     ChDrive (DriveBox.Drive)
  121.  
  122. End Sub
  123.  
  124. Sub Form_Load ()
  125.     CurrDirLabel.Caption = DirBox.Path  'Show full path name in a label
  126.     
  127. End Sub
  128.  
  129. Sub GetDirButton_Click ()
  130.     CurrDirLabel.Caption = DirBox.Path
  131.     ChDir DirBox.Path
  132.     dirPath$ = CurrDirLabel.Caption
  133.     DirDirForm.Show
  134. End Sub
  135.  
  136. Sub OKButton_Click ()
  137.     DirBox.Path = DirBox.List(DirBox.ListIndex)
  138. End Sub
  139.  
  140.