我发现了一些间接方法来更改C#中的标题。但有什么方法可以在VB中更改标题。如何更改Vb.net中的FolderbrowserDialog标题
Dim folderbrowser As New FolderBrowserDialog()
为打开文件对话框有直接method.But我需要一个文件夹浏览器
我发现了一些间接方法来更改C#中的标题。但有什么方法可以在VB中更改标题。如何更改Vb.net中的FolderbrowserDialog标题
Dim folderbrowser As New FolderBrowserDialog()
为打开文件对话框有直接method.But我需要一个文件夹浏览器
我不相信你可以 - 至少在没有某种形式的非托管API调用。
虽然可以通过更改对话框中树的上方显示的描述。
在这里看到对文件:在C#中做THI https://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.description(v=vs.110).aspx
重的方法。那么 - 如果你这样做 - 你可以在VB.Net中实现它。你基本上可以在VB.net中做几乎任何你可以在C#中完成的任何事情 - 所以你应该能够编写VB.Net代码来做同样的事情。
vb.net
Dim dlg as FolderBrowserDialog = new FolderBrowserDialog()
dlg.Description = "Select the document folder"
Dim result As DialogResult = folderBrowserDialog1.ShowDialog()
C#
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.Description = "Select the document folder";
DialogResult result = folderBrowserDialog1.ShowDialog();
设置Description属性给用户一个提示你为什么要显示该对话框。 –