vb浏览文件夹问题
我用了一段代码能浏览文件夹,但是现在我想将弹出的窗口的标题"浏览文件夹"给改下,请问怎么改?
Public Function ShowFolderDialog() As String
Dim spShell, spFolder, spFolderItem, spPath As String
Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0
Set spShell = CreateObject("Shell.Application")
Set spFolder = spShell.BrowseForFolder(WINDOW_HANDLE, "选择目录:", NO_OPTIONS, "C:\Scripts")
If spFolder Is Nothing Then
ShowFolderDialog = ""
Else
Set spFolderItem = spFolder.Self
spPath = spFolderItem.path
spPath = Replace(spPath, "\", "\")
ShowFolderDialog = spPath
End If
End Function
[解决办法]
比较麻烦,需要Hook窗口过程。调用一坨API,还要写Callback
如果不是非常必要就不要修改了。