Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set File Dialog Init Dir (not in code)?

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
0
0
US
By 'not in code' what I mean is:

How do I get around Windows' extremely annoying and presumptuous habit of opening the File Dialog to C:\Documents and Settings\someuser\My Documents\ or C:\Program Files\Visual_Studio\VB98\? This is either for Opening or Saving--something that can be set as a global default for any File Dialog when opened in the VB IDE.

It seems there used to be a registry key, somthing like
HKEY_LOCALMACHINE\SOFTWARE\MICROSOFT\VISUAL STUDIO\DEFAULTPATH...or something like that. I can't find that key or anthing like it, and I have to guess it's settable by adding a key or finding an existing one and setting it. It also seems that *sometimes* (by 'sometimes', I mean this only happens when I *don't* want it to do this)...sometimes it opens to the last location where a file was Opened or Saved, but this is of course, not consistent.

Does anyone really put their documentation in My Documents?!!? Or their VB projects and objects in C:\Program_Files\Visual Studio\VB98\?? There's got to be a better way...Thanks,
--jsteph
 
Wasn't this your question.....How to set File Dialog Init Dir (not in code)????

Maybe just right click on the CommonDialog and select properties.....you can set it in there. :)
 
chadt,
No...I'm referring to the File Dialog that comes up when you open VB, or save a VB object, *not* the .ocx object used in a user application.
--jsteph
 
ok....that makes more sense.....I just have a mapped drive to all my development work.....then I can just select the drive from the drop down....no biggy.

 
Find the shortcut to VB on the start menu. Right click and choose properties. On the property page set " Start In" to the folder you want to use.

 
Mosaic,
I'd already gone that route, but it's not global; so double-clicking a vbp or opening vb through some other means doesn't carry that property. I'm 99% sure there was a registry setting that did this, and I believe it was settable for any MS application.
--jsteph
 
I'm confused,as others are I'm sure. VB defaults the save directory to the installation path of VB. Other programs use registry keys like "DefaultFileOpenLocation" like visual studio to dictate where they save. many programs use the hkey_local_machine/software/microsoft/windows/currentversion/explorer/shell folders/personnel to get a save path......but then this has nothing to do with vb 5 or 6 especiallly when you don't want to do anything with code.
 
Semper,
My 'not in code' was there to preempt people from seeing 'file dialog' and thinking it had to do with a user-defined file dialog object/control (.ocx) as opposed to the file dialog that pops up in the vb ide. But it appears my attempt at preempting confusion just created more of it.

If VB doesn't have the "DefaultFileOpenLocation" as other programs, I'm out of luck, I was just looking for a timesave, but chadt's mapped drive seems to be the best workaround for this. Thanks all,
--jsteph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top