Private Sub Command1_Click()
Dim TxtFileName$
If File1.ListIndex > 0 Then
TxtFileName = File1.Path & "\" & File1.List(File1.ListIndex)
Shell "notepad " & TxtFileName, 1
End If
End Sub
Private Sub Command2_Click()
Dim TxtFileName$
If File1.ListIndex > 0 Then
TxtFileName = File1.Path & "\" & File1.List(File1.ListIndex)
Kill TxtFileName
End If
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub File1_Click()
Dim a$
List1.Clear
Open File1.Path & "\" & File1.List(File1.ListIndex) For Input As #1
Do While Not EOF(1)
Line Input #1, a
If a <> "" Then List1.AddItem a
Loop
Close #1
End Sub
Private Sub Form_Load()
File1.Path = "D:\file\"
Command1.Caption = "修改"
Command2.Caption = "删除"
Command3.Caption = "退出"
File1.Pattern = "*.txt"
End Sub