Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:如何打开指定文件夹下面任何一个文件?

1楼
ZJZK2018 发表于:2023/10/8 8:50:00
如何打开指定文件夹下面任何一个文件?
如文件夹(名称:工程类)下有文件:AA,DF,GL,

Dim dlg As New OpenFileDialog
dlg.Filter = "资料文件|*.doc;*.docx;*.xls;*.xlsx;*.png;*.dwg;*.pdf;*.jpg;*.zip;*.rar;*.HzTbs;"
If dlg.ShowDialog = DialogResult.OK Then
    Dim flnm As String = dlg.FileName                          '要添加的文件名
    Dim pth As String = ProjectPath & "Attachments\工程类\"
    If FileSys.DirectoryExists(pth) = False Then       '判断指定的目录是否存在
        FileSys.CreateDirectory(pth)                   '创建目录
    End If
End If

Dim Proc As New Process '打开文件
Proc.File = fl
Proc.Start()

2楼
有点蓝 发表于:2023/10/8 8:59:00
Dim dlg As New OpenFileDialog
dlg.Filter = "资料文件|*.doc;*.docx;*.xls;*.xlsx;*.png;*.dwg;*.pdf;*.jpg;*.zip;*.rar;*.HzTbs;"
dlg.InitialDirectory = ProjectPath & "Attachments\工程类\"
If dlg.ShowDialog = DialogResult.OK Then
    Dim Proc As New Process '打开文件
Proc.File = dlg.FileName
Proc.Start()
End If
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.