Folder Browser
This is a Function which displays the Browse directory dialogue and returns a path as a string. Unlike the usual shell command, this code works even on machines without the Active Desktop or IE 5 installed.
AI
สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
ซอร์สโค้ด
Public Function BrowseForFolder(lnghWndOwner As Long) As String
''Opens a Treeview control that displays the directories in a computer and Returns a String
Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo
szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = lnghWndOwner
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With
lpIDList = SHBrowseForFolder(tBrowseInfo)
If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End If
BrowseForFolder = sBuffer
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine