Dim ins, kuozhan As String
Private Sub Combo1_Click()
File1.Pattern = Mid$(Combo1.Text, 19)
End Sub
Private Sub Command1_Click()
dkyx (1)
End Sub
Private Sub Command2_Click()
End
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_DblClick()
dkyx (1)
End Sub
Private Sub Form_Load()
Drive1.Drive = "c:\"
ins = "所有文件(*.*)"
Combo1.AddItem ins + Space(18 - Len(ins)) + "*.*", 0
ins = "可执行文件(*.exe)"
Combo1.AddItem ins + Space(18 - Len(ins)) + "*.exe", 1
ins = "JPG图像文件(*.jpg)"
Combo1.AddItem ins + Space(18 - Len(ins)) + "*.jpg", 2
ins = "文本文件(*.txt)"
Combo1.AddItem ins + Space(18 - Len(ins)) + "*.txt", 3
ins = "mp3文件(*.mp3)"
Combo1.AddItem ins + Space(18 - Len(ins)) + "*.mp3", 4
Combo1.ListIndex = 0
End Sub
Public Function dkyx(ByVal n As Integer)
kuozhan = StrConv(Right$(File1.FileName, 3), vbLowerCase)
If kuozhan = "exe" Then
f1 = Shell(File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "txt" Then
Print File1.Path, File1.FileName
f1 = Shell("notepad.exe" + " " + File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "jpg" Then
f1 = Shell("mspaint.exe" + "" + File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "mp3" Then
f1 = Shell("D:\Program Files\KuGou\KuGou2010\KuGoo.exe" + " " + File1.Path + "\" + File1.FileName, 1)
End If
End Function
帮我看看这个多媒体浏览器 只能打开exe 的文件其他的都打不开
Public Function dkyx(ByVal n As Integer)
kuozhan = StrConv(Right$(File1.FileName, 3), vbLowerCase)
If kuozhan = "exe" Then
f1 = Shell(File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "txt" Then
Print File1.Path, File1.FileName
f1 = Shell("notepad.exe" + " " + File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "jpg" Then
f1 = Shell("mspaint.exe" + "" + File1.Path + "\" + File1.FileName, 1)
End If
If kuozhan = "mp3" Then
f1 = Shell("D:\Program Files\KuGou\KuGou2010\KuGoo.exe" + " " + File1.Path + "\" + File1.FileName, 1)
End If
End Function
主要就是上面这段 有高手帮解决下没 小弟在这谢谢啦