簡體   English   中英

如何在Vb.net中更改FolderbrowserDialog標題

[英]How to change FolderbrowserDialog Title in Vb.net

我發現了一些間接方法來更改C#中的標題。 但是有什么辦法可以在VB中更改標題。

  Dim folderbrowser As New FolderBrowserDialog()

對於openfiledialog有直接方法。但是我需要一個文件夾瀏覽器

我不相信您可以-至少沒有某種非托管api調用。

但是,您可以更改對話框中樹上方顯示的說明。

請參閱此處以獲取有關該文檔的文檔: https : //msdn.microsoft.com/zh-cn/library/system.windows.forms.folderbrowserdialog.description(v=vs.110).aspx

重新找到在C#中找到的方法。 好吧-如果您這樣做-可以在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();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM