home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Log-Me-In-2022641012006.psc / FilePickerForm.frm < prev    next >
Text File  |  2006-10-01  |  4KB  |  130 lines

  1. VERSION 5.00
  2. Begin VB.Form FilePickerForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Visual Basic File Picker "
  5.    ClientHeight    =   6840
  6.    ClientLeft      =   45
  7.    ClientTop       =   435
  8.    ClientWidth     =   9255
  9.    Icon            =   "FilePickerForm.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   6840
  14.    ScaleWidth      =   9255
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CommandButton PickedButton 
  18.       Caption         =   "ACCEPT"
  19.       Height          =   495
  20.       Left            =   6600
  21.       TabIndex        =   6
  22.       Top             =   6240
  23.       Width           =   1215
  24.    End
  25.    Begin VB.Timer InitializeTimer 
  26.       Enabled         =   0   'False
  27.       Interval        =   100
  28.       Left            =   2160
  29.       Top             =   3240
  30.    End
  31.    Begin VB.CommandButton CancelButton 
  32.       Cancel          =   -1  'True
  33.       Caption         =   "CANCEL"
  34.       Height          =   495
  35.       Left            =   7920
  36.       TabIndex        =   4
  37.       Top             =   6240
  38.       Width           =   1215
  39.    End
  40.    Begin VB.TextBox FileNameText 
  41.       Height          =   285
  42.       Left            =   120
  43.       TabIndex        =   3
  44.       Top             =   5880
  45.       Width           =   9015
  46.    End
  47.    Begin VB.FileListBox File1 
  48.       Height          =   2820
  49.       Left            =   120
  50.       TabIndex        =   2
  51.       Top             =   2880
  52.       Width           =   9015
  53.    End
  54.    Begin VB.DriveListBox Drive1 
  55.       Height          =   315
  56.       Left            =   120
  57.       TabIndex        =   1
  58.       Top             =   120
  59.       Width           =   2175
  60.    End
  61.    Begin VB.DirListBox Dir1 
  62.       Height          =   2115
  63.       Left            =   120
  64.       TabIndex        =   0
  65.       Top             =   600
  66.       Width           =   9015
  67.    End
  68.    Begin VB.Label SaveAsCaution 
  69.       Caption         =   $"FilePickerForm.frx":0442
  70.       ForeColor       =   &H000000FF&
  71.       Height          =   375
  72.       Left            =   120
  73.       TabIndex        =   5
  74.       Top             =   6240
  75.       Width           =   6015
  76.       WordWrap        =   -1  'True
  77.    End
  78. End
  79. Attribute VB_Name = "FilePickerForm"
  80. Attribute VB_GlobalNameSpace = False
  81. Attribute VB_Creatable = False
  82. Attribute VB_PredeclaredId = True
  83. Attribute VB_Exposed = False
  84. Dim Picked As Boolean
  85. Private Sub CancelButton_Click()
  86.  Picked = False
  87.  Unload Me
  88. End Sub
  89. Private Sub File1_DblClick()
  90.  Call PickedButton_Click
  91. End Sub
  92. Private Sub PickedButton_Click()
  93.  Picked = True
  94.  Unload Me
  95. End Sub
  96. Private Sub Dir1_Click()
  97.  File1.Path = Dir1.List(Dir1.ListIndex)
  98.  On Error Resume Next
  99.  File1.ListIndex = 0
  100. End Sub
  101. Private Sub Drive1_Change()
  102.  On Error Resume Next
  103.  Dir1.Path = Left$(Drive1, 2)
  104.  Call Dir1_Click
  105. End Sub
  106. Private Sub File1_Click()
  107.  FileNameText = File1
  108. End Sub
  109. Private Sub FileNameText_GotFocus()
  110.  FileNameText.SelStart = 0
  111.  FileNameText.SelLength = Len(FileNameText)
  112. End Sub
  113. Private Sub Form_Load()
  114.  InitializeTimer.Enabled = True
  115. End Sub
  116. Private Sub Form_Unload(Cancel As Integer)
  117.  FileNameText = IIf(Picked, FileNameText, "")
  118.  If Me.Visible Then
  119.   Me.Visible = False
  120.   Cancel = True
  121.  Else
  122.   Cancel = False
  123.  End If
  124. End Sub
  125. Private Sub InitializeTimer_Timer()
  126.  InitializeTimer.Enabled = False
  127.  Call Dir1_Click
  128.  Call File1_Click
  129. End Sub
  130.