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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ofNoChangeDir question

Status
Not open for further replies.

BlueGhost79

Programmer
Feb 6, 2008
11
US
Is there a way to prevent the system from changing the current working directory entirely while using a file save or file open dialog. I know ofNoChangeDir will restore it to the original working folder when the dialog closes, but is there a way to prevent the change entirely?
 
AFAIK, no, there isn't.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Hi

Better late than never I say..

Before you call the Open / Save dialogs save the current working directory.

AnsiString CWD = GetCurrentDir();

and then when the dialog closes just set it back.

SetCurrentDir(CWD);



Hope this helps!

Regards

BuilderSpec
 
Yes you can!

Add an event procedure for OnFolderChange. If you don't like the new folder, change it back.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top