폴더를 선택하는 예제입니다.
Dim MyBl As BrowseInfo
Dim FList As Long
Dim DirName As String
Dim SelFolder As String
DirName = Space(255)
MyBl.sTitle = "Select Root Folder"
MyBl.sDisplayName = Space(255)
MyBl.ulFlags = Bif_ReturnOnlyFSDirs
FList = SHBrowseForFolder(MyBl)
SelFolder = SHGetPathFromIDList(FList, DirName)
DirName = Left(DirName, InStr(1, DirName, Chr(0)) - 1)
If DirName <> "" Then
TextBoxFolder.Text = DirName
Else
TextBoxFolder.Text = ""
End If
댓글
댓글 쓰기