How do you make the common dialog initdir default to my computer? Thank you for the help.
Joe
Printable View
How do you make the common dialog initdir default to my computer? Thank you for the help.
Joe
could u run that one by me one more time... sloooowley please :)
I have a common dialog control. I need it to make the default directory(the initdir) to My Computer so that they see all the drives and such. How would I do this? Thank you for the help.
Joe
oh, yes, see what u mean... that is a good question Joey_k29.
not sure its possible though.... I'v never seen "My Computer" beeing the init dir of a common dialog in any program... have u ?
Also I tried using the Browse for Folder thingy built into Windows, and when selecting the "My Computer" u are not allowed to select ok. (Thought I might find what to set the init dir to that way...)
Methinks it is some crazy-a** registry key, like "{a2a9545d-a0c2-42b4-9708-a0b2badd77c8}" but some other permutation of hex numbers.
As an alternative to the Common Dialog, what about using the 3 Amigo controls: DriveListBox, FileListBox and DirListBox? Your users would be able to see all mapped drives very easily.
I tried returning the systempath using API calls, but it did not like that at all. I guess it was not as simple a question as I thought :P I was looking for a quick fix, but it does not appear like there is one. Thank you for the help.
Joe
hmm... sorry I could not help u solve this... we just have to keep our eyes open ... might stumble onto some solution... If u do let us know ? :)
i would go for the DriveListBox like Hack said
The simplicity and advantages(visually as well as for ease of programming) are more appropriate for this situation. Thank you for your help. If no one knows to do it through common dialog, I may simply have to place my default elsewhere. Thank you for the help and suggestions once again.
Joe
i have 1 more sugestin...you could setup a form like a common dialog
The main advantage of the common dialog is the ability to limit the files that can be selected to only one type(hence the need for no error checking). This advantage is well worth directing the default directory elsewhere. Hmm, but how about this? What if I put the default directory to C: and sent a backspace immediately as it was called?? Is there something more graceful similar to this that could work? Thanks for the help.
Joe
Found It!
The comment that filburt1 made about this being some kind of registry key triggered something in my rapidly deteriorating memory. I took out a subscription to the Visual Basic Programmers Journal back in 1994, and have every issue of the magazine since then stored in boxes and binders. I remembered seeing something about using the Common Dialog to fire up My Computer, and after 2 hours of searching last night I found it, in a Q & A section of a 1998 issue (I already forgot which month). Here it is. Thanks to Karl Peterson for writing it and thanks to my wife for allowing me to keep almost 8 years worth of old magazines in "her" basement.(Spoken in the tone of voice of a TV game show host) And as a special added bonus for appearing in our thread today, you will also receive - Network NeighborhoodVB Code:
Private Sub Command1_Click() With CommonDialog1 .CancelError = True .InitDir = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" .DialogTitle = "My Computer" .ShowOpen End With End SubVB Code:
Private Sub Command1_Click() With CommonDialog1 .CancelError = True .InitDir = "::{208D2C60-3AEA-1069-A2D7-08002B30309D}" .DialogTitle = "Starting In Network Neighborhood" .ShowOpen End With End Sub
Damn good post Hack !! :)
best piece of detective work I ever saw on this site... thanks for sharing :)
I know this is going to sound way, way geeky peet, but it was fun!!
You are a nut. Haha, but thank you for all the help. This will be particularly useful. Thanks again.
Joe