OpenFileDialog question


#1

Hello,

I am trying ton call a choosing directory to open file with:

OpenFileDialog(“Select a File to open”, “.”, “.”, “All files (.)|.”, “”);

Where must I include the directory path, please ?

Thank-you,
Gilbert


#2

Okay, I have it :

function OpenSelectFile(FolderName: String);
var
Path, MyFolder: String;
begin
Path := GetGlobalVar(“HEPHPDataPath”, “”);
MyFolder := Path + FolderName + " \";
Result := OpenFileDialog(“Select a File to open”, “.”, “.”, “All files (.)|.”, MyFolder);
end;

\ means anti slash