以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]打开文件目录  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=139291)

--  作者:天一生水
--  发布时间:2019/8/10 8:31:00
--  [求助]打开文件目录
我在选择文件后,希望同时打开文件所在的目录,怎样获取文件所在的路径?
谢谢!

Dim dlg As New OpenFileDialog
dlg.MultiSelect = True
If dlg.ShowDialog = DialogResult.OK Then
    OutPut.Show("你选择了" & dlg.FileNames.Length & "个文件, 分别是:")
    For Each fl As String In dlg.FileNames
        Output.Show(FileSys.GetName(fl))
    Next
    
    Dim Proc As New Process
    Proc.File = dlg.InitialDirectory     ???
    proc.start
End If

--  作者:有点蓝
--  发布时间:2019/8/10 8:53:00
--  
Dim Proc As New Process
    Proc.File = FileSys.GetParentPath(dlg.FileNames(0))
    proc.start

--  作者:天一生水
--  发布时间:2019/8/10 8:59:00
--  
谢谢蓝老师!
这个打开的文件目录窗口,能否设置窗口大小和位置?

--  作者:有点蓝
--  发布时间:2019/8/10 9:37:00
--  
无法设置