风,我现在做了段程序,你帮我看看为什么就是显示不出我要求的效果累??
Dim i As String
Dim j As String
Dim x As Long
Dim y As String
Private Sub Check_Click(Index As Integer)
Dim 后缀(8) As String
后缀(1) = "*.exe"
后缀(2) = "*.txt"
后缀(3) = "*.doc"
后缀(4) = "*.elx"
后缀(5) = "*.jpg"
后缀(6) = "*.htm"
后缀(7) = "*.pdh"
后缀(8) = "*.dll"
For x = 0 To 7
If Check(x).Value = 1 Then
y = y & ";" & 后缀(x + 1)
End If
Next x
End Sub
Private Sub Command1_Click()
y = Mid(y, 2)
File1.Parent = y
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()
i = File1.List(File1.ListIndex)
If UCase(Right(i, 4)) = ".TXT" Then
Open (File1.Path & "\" & i) For Input As #1
Do While Not EOF(1)
Line Input #1, j
j = Text & j & vbCrLf
Loop
Close #1
j = Replace(j, ".a:", ".speed")
j = Replace(j, ".b:", ".high")
j = Replace(j, ".c:", ".weigth")
j = Replace(j, "*", vbCrLf & "")
End If
RichTextBox1.Text = j
End Sub
Private Sub Form_Load()
File1.Path = Dir1.Path
Dir1.Path = Drive1.Drive
Drive1.Drive = "d:"
Dir1.Path = "E:\mengyuan"
End Sub