正文
vb.net打开当前目录 vbnet openfiledialog
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
谁知道VB.NET代表根目录的语句是什么
Imports System.IO '引用命名空间
Dim AppPath As String = Directory.GetCurrentDirectory() '获取应用程序的当前工作目录
Process.Start(AppPath) '打开当前目录
怎样在vb.net中用button打开程序运行的根目录
这个就是你要的了!希望你能用!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim AppPath As String = Directory.GetCurrentDirectory() '获取应用程序的当前工作目录
Process.Start(AppPath) '打开当前目录
End Sub
忘了说,这个要引用命名空间!
把Imports System.IO 写到代码最上边就好了!
vb.net 2010 打开当前文件夹下的文件
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim AppPath As String = Directory.GetCurrentDirectory() '获取应用程序vb.net打开当前目录的当前工作目录 Process.Start(AppPath) '打开当前目录 End Sub
vb.net打开当前目录我也找来的vb.net打开当前目录,只找到这个vb.net打开当前目录,希望对vb.net打开当前目录你有帮助。
在VB.NET中如何取得当前目录的路径?
命名空间:System.Windows.Forms
Application.StartupPath 属性(返回String)
获取启动了应用程序的可执行文件的路径,不包括可执行文件的名称。
Application.ExecutablePath 属性(返回String)
获取启动了应用程序的可执行文件的路径,包括可执行文件的名称。
关于vb.net打开当前目录和vbnet openfiledialog的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。