VERSION 5.00
Begin VB.Form Fileform 
   AutoRedraw      =   -1  'True
   ClientHeight    =   4140
   ClientLeft      =   195
   ClientTop       =   1725
   ClientWidth     =   7530
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   LinkTopic       =   "Form2"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4140
   ScaleWidth      =   7530
   Visible         =   0   'False
   Begin VB.PictureBox PicturePreview 
      AutoSize        =   -1  'True
      Height          =   975
      Left            =   6120
      ScaleHeight     =   915
      ScaleWidth      =   1035
      TabIndex        =   12
      Top             =   2040
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Left            =   6240
      TabIndex        =   11
      Top             =   720
      Width           =   1095
   End
   Begin VB.CommandButton CommandOK 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "OK"
      Height          =   375
      Left            =   6240
      TabIndex        =   10
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox CurrFile 
      Appearance      =   0  'Flat
      Height          =   285
      Left            =   120
      TabIndex        =   6
      Top             =   360
      Width           =   2895
   End
   Begin VB.TextBox CurrDir 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      Height          =   285
      Left            =   3120
      TabIndex        =   5
      Top             =   360
      Width           =   2775
   End
   Begin VB.TextBox FileTypesBox 
      Appearance      =   0  'Flat
      Height          =   285
      Left            =   120
      TabIndex        =   4
      Top             =   3480
      Width           =   2895
   End
   Begin VB.FileListBox File1 
      Appearance      =   0  'Flat
      Height          =   2370
      Left            =   120
      TabIndex        =   2
      Top             =   720
      Width           =   2895
   End
   Begin VB.DriveListBox Drive1 
      Appearance      =   0  'Flat
      Height          =   315
      Left            =   3120
      TabIndex        =   1
      Top             =   3480
      Width           =   2775
   End
   Begin VB.DirListBox Dir1 
      Appearance      =   0  'Flat
      Height          =   2280
      Left            =   3120
      TabIndex        =   0
      Top             =   720
      Width           =   2775
   End
   Begin VB.Label PicturePreviewLabel 
      Caption         =   "Preview"
      Height          =   255
      Left            =   6120
      TabIndex        =   13
      Top             =   1800
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.Label Label3 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      Caption         =   "File Names:"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   120
      Width           =   2895
   End
   Begin VB.Label Label2 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      Caption         =   "Drives:"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   3120
      TabIndex        =   8
      Top             =   3240
      Width           =   2775
   End
   Begin VB.Label Pattern 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      Caption         =   "List of File Types:"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   3240
      Width           =   2895
   End
   Begin VB.Label Label1 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      Caption         =   "Directories:"
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   3120
      TabIndex        =   3
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "Fileform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Close_Click()
    UnloadMe
End Sub

Private Sub CommandOK_Click()
    ' When they accept the file with OK button, do this
    Dim RetVal
'    If Currfile.Text = Dir1.List(Dir1.ListIndex) Then
'        ' ain't selected file yet
'        Exit Sub
'    End If
    SelectedDrive = Drive1
    SelectedPath = Dir1
    
    SelectedFile = File1 ' changed 3/28/98
'    SelectedFile = Currfile
    Unload Me
End Sub

Private Sub Command2_Click()
    SelectedFile = ""
    SelectedPath = ""
    SelectedDrive = ""
    UnloadMe
End Sub

Private Sub Dir1_Change()
    If Loading Then Exit Sub
    SelectedPath = Dir1.Path
    File1.Path = Dir1.Path      ' Set file list box path.
    CurrDir.Text = Dir1.List(Dir1.ListIndex)
    CurrFile.Text = ""
    CurrFile.Text = CurrDir.Text
    PicturePreview.Visible = False
    PicturePreviewLabel.Visible = False
End Sub

Private Sub Drive1_Change()
    If Loading Then Exit Sub
    Dim LocalError
    On Error GoTo LocalError
    SelectedDrive = Drive1.Drive
    Dir1.Path = Drive1.Drive
    
    PicturePreview.Visible = False
    PicturePreviewLabel.Visible = False
    GoTo EndSub
LocalError:
    LocalError = Error
    MsgBox "Drive Change Error: " & LocalError, vbExclamation, "Error"
    Resume Next
EndSub:
End Sub

Private Sub File1_Click()
    CurrFile = ""
    FileTypesBox.Text = File1.Pattern      ' Set text to new pattern.
    If Right(CurrDir.Text, 1) <> "\" Then
        CurrFile.Text = CurrDir.Text & "\" & File1.List(File1.ListIndex)
    Else
        CurrFile.Text = CurrDir.Text & File1.List(File1.ListIndex)
    End If
    SelectedFile = CurrFile.Text
    If UCase(Right(SelectedFile, 4)) = ".BMP" Or _
    UCase(Right(SelectedFile, 4)) = ".WMF" Or _
    UCase(Right(SelectedFile, 4)) = ".ICO" Then
        PicturePreview = LoadPicture(SelectedFile)
        PicturePreview.Visible = True
        PicturePreviewLabel.Visible = True
    Else
        PicturePreview.Visible = False
        PicturePreviewLabel.Visible = False
    
    End If
End Sub

Private Sub File1_DblClick()
    ' When they accept the file, do this
    SelectedDrive = Drive1
    SelectedPath = Dir1
    SelectedFile = File1 'change 3/28/99
'    SelectedFile = Currfile
    Unload Me
End Sub

Private Sub File1_PathChange()
    CurrFile = ""
'    FileTypesBox.Text = File1.Pattern      ' Set text to new pattern.
    If Right(CurrDir.Text, 1) <> "\" Then
        CurrFile.Text = CurrDir.Text & "\" & File1.List(File1.ListIndex)
    Else
        CurrFile.Text = CurrDir.Text & File1.List(File1.ListIndex)
    End If
End Sub

Private Sub File1_PatternChange()
    CurrFile.Text = ""
'    FileTypesBox.Text = File1.Pattern      ' Set text to new pattern.
    If Right(CurrDir.Text, 1) <> "\" Then
        CurrFile.Text = CurrDir.Text & "\" & File1.List(File1.ListIndex)
    Else
        CurrFile.Text = CurrDir.Text & File1.List(File1.ListIndex)
    End If
End Sub

Private Sub Form_Load()
    Loading = True
    'Me.Icon = MainForm.Icon
    Me.Drive1 = SelectedDrive
    File1 = SelectedPath
    CurrDir = SelectedPath
    If Right(CurrDir.Text, 1) <> "\" Then
        CurrFile.Text = CurrDir.Text & "\" & File1.List(File1.ListIndex)
    Else
        CurrFile.Text = CurrDir.Text & File1.List(File1.ListIndex)
    End If
    Me.Width = 7650
    Me.Height = 4485
    Me.Top = 5
    Me.Left = 0
  '  MsgBox SystemTableSet!HomeDrive & SystemTableSet!HomeDirectory
    ' Dir1.Path = SYSTEMTableSet!HomeDrive & SYSTEMTableSet!HomeDirectory
    Dir1.Path = SelectedPath
    Loading = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
   ' Me!parent.textASCIIEdit.Text = InVar
End Sub

Private Sub FileTypesBox_Change()
    File1.Pattern = FileTypesBox.Text
End Sub

