Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

Getting a PATH from a user

I am using the CommonDialog control to get files from the user. This is really easy. But how do I get just a PATH from the user? I tried the CommonDialog and it works as long as there is a file in the directory for the user to select. But some times the directory being selected is totaly empty and there is no way to use the ShowOpen dialog without a file being selected.
0
schworak
Asked:
schworak
  • 3
1 Solution
 
clifABBCommented:
I'm afraid you may have to create your own dialog box.  This is the only solution I've ever been able to come up with.

I submit this as a comment.  If, as I believe, there is no alternative other than creating your own dialog box, let me know and I'll resubmit as an answer.
0
 
raybCommented:
Check out this site:  http://www.mvps.org/ccrp/
They've got a cool FolderTreeview control.
0
 
schworakAuthor Commented:
I can't get the treeview control to even load up in VB. I have a help request in on the news group. What I have done in the mean time is just use the OpenSave method on the normal dialog control with junk as the file name. I don't need a file name so what ever is entered gets ignored for now. Not perfect, but it works.
0
 
schworakAuthor Commented:
Sorry for the delay in testing the TreeView answer. There have been problems getting it properly installed. I now have the suggested method for installing so I will be able to test it's function now.
0
 
schworakAuthor Commented:
WOO HOO! That works great! Thanks for pointing me to the right place!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now