【发布时间】:2014-08-12 09:12:21
【问题描述】:
我在使用 FolderBrowserDialog 时遇到了一些问题
我已经尝试了所有可以在这里找到的帖子,就我想要的而言,我几乎就在那里。
以下是我的代码:
Private Sub ButtonBrowseOutput_Click(sender As Object, e As EventArgs) Handles ButtonBrowseOutput.Click
Dim dialog = New FolderBrowserDialog()
dialog.SelectedPath = Application.StartupPath
If DialogResult.OK = dialog.ShowDialog() Then
TextBoxShowOutput.Text = dialog.ToString & "/helloforum" & ".txt"
End If
End Sub
会给我这样的东西:
System.Windows.Forms.FolderBrowserDialog/helloforum.txt
我希望它给它的地方例如:
c:/users/sexyname/desktop/helloforum.txt
【问题讨论】:
-
helloforum.txt是否总是从您的application.startupPath中获取信息?? -
是的,它对我有用 :)
-
如果是这样,那么你不需要使用这个
Dim dialog = New FolderBrowserDialog()而不是这个你可以获得像textBoxShowOutput.Text = Application.StartupPath & "/helloforum.txt"这样的文件名
标签: vb.net folderbrowserdialog