程序代码: |
Private Sub BrowseBtn_Click(sender As Object, e As RoutedEventArgs)
Dim folderBrowserDialog As New System.Windows.Forms.FolderBrowserDialog()
Dim result As System.Windows.Forms.DialogResult = folderBrowserDialog.ShowDialog()
If result = System.Windows.Forms.DialogResult.OK Then
Me.BrowserPathTextBox.Text = folderBrowserDialog.SelectedPath
End If
End Sub
默认目录就使用:
folderBrowserDialog1.SelectedPath
RootFolder属性是指对话框的根目录,比如从桌面开始,从打印机文件夹开始,从开始菜单开始,或者从我的电脑开始等等。指定了它,你就不能访问它的上一级了。
[本日志由 tiancao1001 于 2018-12-06 07:25 PM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |