加载目录树
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim lst As new Dictionary(of String, WinForm.TreeNode)
Dim dtb As New DataTableBuilder("文件")
dtb.AddDef("类型", Gettype(String), 10)
dtb.AddDef("名称", Gettype(String), 255)
dtb.AddDef("路径", Gettype(String), 999)
Dim dt As DataTable = dtb.Build(True)
Dim dr As DataRow
For Each fl As String In FileSys.GetFiles("f:\") 这里改成自己的路径
Dim name As String = FileSys.GetName(fl)
Dim arr() As String = name.Split(".")
dr = dt.AddNew()
dr("类型") = arr(1)
dr("名称") = arr(0)
dr("路径") = fl
Next
trv.BuildTree(dt,"类型|名称")
目录树点击AfterSelectNode事件
If e.Node.Level = 1 Then
Dim Proc As New Process '定义一个新的Process
Proc.File = e.Node.DataRow("路径") '指定要打开的文件
Proc.Start()
End If