[RESOLVED] Common Dialog to Open Folders (Not Browse Folder API)
I've done searching for this for the last 10 minutes or so and all I can find is stuff about the Browse Folder API. What I am looking for is the standard common dialog Open window, that lets you select folders instead of files. Is this possible or do I have to use the Browse Folder API?
Re: Common Dialog to Open Folders (Not Browse Folder API)
Well, you could use the DirListbox and DriveListbox.
Other than those two controls, used in tandem, the SHBrowseFolder API is it.
Re: Common Dialog to Open Folders (Not Browse Folder API)
I couldn't find the nice example I had of it but the API you are after is SHBrowseForFolder.
1 Attachment(s)
Re: Common Dialog to Open Folders (Not Browse Folder API)
Re: Common Dialog to Open Folders (Not Browse Folder API)
Quote:
Originally Posted by penagate
I couldn't find the nice example I had of it but the API you are after is
SHBrowseForFolder.
I think he has already found that, but doesn't want to use it.
Re: Common Dialog to Open Folders (Not Browse Folder API)
Hmm, well, it's the only way to get the Browse for Folder dialog box. It isn't included as part of the CommonDialog control.
Re: Common Dialog to Open Folders (Not Browse Folder API)
Ok, I guess I will just use that. I just thought I had seen a normal Common Dialog that allows folder selection before. As always, thanks for the help guys. :)
Re: Common Dialog to Open Folders (Not Browse Folder API)
There is a folder TreeView control available from CCRP (common control replacement project). Would that do?
Re: Common Dialog to Open Folders (Not Browse Folder API)
Thanks baja, but I was looking for a normal Common Dialog that lets you select folders. Since that doesn't seem to be possible, I will just use the API.
Thanks anyways. :)
Re: Common Dialog to Open Folders (Not Browse Folder API)
No problem, but be sure to check them out. Those guys have some excellent controls. (you can just google them, I dont remember the exact URL right now)
Re: Common Dialog to Open Folders (Not Browse Folder API)
Will do. Thanks a lot. :)
Re: Common Dialog to Open Folders (Not Browse Folder API)
Here is some code I posted yesterday or the day before.
VB Code:
Private Sub Form_Load()
Dim Shell As New Shell, Path As String
Set Shell = New Shell32.Shell
Path$ = Shell.BrowseForFolder(Me.hWnd, "Title Here", 0, "C:\")
MsgBox Path$
Set Shell = Nothing
End Sub
This code will bring up a little "Browse For Folder" dialog.
Hope this helps,
Sir Loin
Re: Common Dialog to Open Folders (Not Browse Folder API)
And how does he make it browse for folders?
Re: Common Dialog to Open Folders (Not Browse Folder API)
If you want to create your own "dialog" then there is a FolderTreeview
control created by Brad Martinez few years ago - really nicely done. It could be found HERE .
Re: Common Dialog to Open Folders (Not Browse Folder API)
Quote:
Originally Posted by RhinoBull
If you want to create your own "dialog" then there is a
FolderTreeview
control created by Brad Martinez few years ago - really nicely done. It could be found
HERE .
Isn't that what I suggested?
Re: Common Dialog to Open Folders (Not Browse Folder API)
Don't know, maybe you did and I missed your post ... is that a problem? :wave:
Re: Common Dialog to Open Folders (Not Browse Folder API)
Of course it is. Now I have to send wossy to kill you. Then maybe you will think twice before posting. :lol:
Re: Common Dialog to Open Folders (Not Browse Folder API)
Quote:
Originally Posted by baja_yu
... Now I have to send wossy to kill you. ... :lol:
Who the heck is wossy ???
Re: Common Dialog to Open Folders (Not Browse Folder API)
Wossname. You didn't know? That will only make him angry.
Re: Common Dialog to Open Folders (Not Browse Folder API)
Just like a give a damn. :lol:
Re: Common Dialog to Open Folders (Not Browse Folder API)
:lol: Ok, guys. I think I will just use the API. I might take a look at inventrex's method though, because I'm not sure what it does (I havn't plugged it into a form yet).
Thanks all.