VB.net 对话框

2026年09月10日 21:12
有2个网友回答
网友(1):

你这2个按钮的目的不是一样吗
Dim fbd As New FolderBrowserDialogfbd.Description = "请选择文件夹。"fbd.RootFolder = Environment.SpecialFolder.Desktop '根目录
fbd.SelectedPath = "C:\Windows" '默认打开文件夹
fbd.ShowNewFolderButton = True '是否可以创建新文件夹
If fbd.ShowDialog(Me) = DialogResult.OK Then
textbox1.text=fbd.SelectedPath
End If

网友(2):

Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" _ (ByVal hwnd As Integer, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Integer) As Integer Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ShellAbout(Me.Handle.ToInt32, "我的程序", "哈哈", 0) End Sub