本文介绍了Vb.net-FolderBrowserDialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在FolderBrowserDialog
上遇到了一些麻烦我已经尝试了所有可以在这里找到的帖子,就我想要的而言,我几乎就在那儿.以下是我的代码:
I am having some troubles with FolderBrowserDialog
I've tried all the post I could find here and I'm almost there in terms of what I want.following is my code:
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
例如,我希望在其中给出它:
Where I want it to give it for example:
c:/users/sexyname/desktop/helloforum.txt
推荐答案
TextBoxShowOutput.Text = dialog.ToString & "/helloforum" & ".txt"
必须是:
TextBoxShowOutput.Text = dialog.SelectedPath & "/helloforum" & ".txt"
这篇关于Vb.net-FolderBrowserDialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!