VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3555
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7560
   LinkTopic       =   "Form1"
   ScaleHeight     =   3555
   ScaleWidth      =   7560
   StartUpPosition =   3  '窗口缺省
   Begin VB.OptionButton Option2 
      Caption         =   "一次读入"
      Height          =   315
      Left            =   5190
      TabIndex        =   6
      Top             =   3240
      Width           =   1095
   End
   Begin VB.OptionButton Option1 
      Caption         =   "行读"
      Height          =   315
      Left            =   4200
      TabIndex        =   5
      Top             =   3240
      Value           =   -1  'True
      Width           =   885
   End
   Begin VB.TextBox Text1 
      Height          =   3015
      Left            =   4170
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   4
      Text            =   "v6j09-02.frx":0000
      Top             =   120
      Width           =   3225
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   150
      TabIndex        =   3
      Text            =   "Combo1"
      Top             =   3120
      Width           =   1935
   End
   Begin VB.FileListBox File1 
      Height          =   3330
      Left            =   2130
      TabIndex        =   2
      Top             =   120
      Width           =   1935
   End
   Begin VB.DirListBox Dir1 
      Height          =   2400
      Left            =   90
      TabIndex        =   1
      Top             =   480
      Width           =   1935
   End
   Begin VB.DriveListBox Drive1 
      Height          =   300
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1935
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Combo1_Click()
    File1.Pattern = Combo1.Text
End Sub

Private Sub Dir1_Change()
    File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_Click()
    On Error Resume Next
    Text1.Text = ""
    If Right(Dir1.Path, 1) = "\" Then
        Open Dir1.Path + File1.FileName For Input As #1
    Else
        Open Dir1.Path + "\" + File1.FileName For Input As #1
    End If
    If Option1 = True Then
        Do While Not EOF(1)
            Line Input #1, InputData
            Text1.Text = Text1.Text + InputData + vbCrLf
        Loop
    Else
        Text1.Text = Input(LOF(1), 1)
    End If
    Close #1
End Sub

Private Sub Form_Load()
    Combo1.AddItem "*.txt"
    Combo1.AddItem "*.*"
    Combo1.Text = "*.txt"
    File1.Pattern = "*.txt"
End Sub
