Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

default directory for saveas dialog boxes

rickmrickm Member Posts: 4
How do I set the default save directory for a save dialog component? I have set the "Initial Directory" in the object inspector, but it has no effect. The online help (I am using Delphi 6) states that it can be set only through the "ForceCurrentDirectory" Dialogs unit variable & can only be set to the current working directory or My Computer based on Windows OS version. Any way around this? Thanks in advance.

Comments

  • zibadianzibadian Member Posts: 6,349
    : How do I set the default save directory for a save dialog component? I have set the "Initial Directory" in the object inspector, but it has no effect. The online help (I am using Delphi 6) states that it can be set only through the "ForceCurrentDirectory" Dialogs unit variable & can only be set to the current working directory or My Computer based on Windows OS version. Any way around this? Thanks in advance.
    :
    You could try to set the InitialDir property in the OnCreate() event. This should set the save directory to the directory you want. And otherwise you could try the SetCurrentDir() API call.
  • rickmrickm Member Posts: 4
    : : How do I set the default save directory for a save dialog component? I have set the "Initial Directory" in the object inspector, but it has no effect. The online help (I am using Delphi 6) states that it can be set only through the "ForceCurrentDirectory" Dialogs unit variable & can only be set to the current working directory or My Computer based on Windows OS version. Any way around this? Thanks in advance.
    : :
    : You could try to set the InitialDir property in the OnCreate() event. This should set the save directory to the directory you want. And otherwise you could try the SetCurrentDir() API call.
    : : Thanks for the help. It worked kinda'. I input the default directory in hte InitialDir in the object inspector. When I right-click & chose Test Dialog it open in the directory I input. However when compiled, it still pts. to current working directory. Any other suggestions?

Sign In or Register to comment.