Hi:
I have created a memo box with a save button on a form. Does anyone know how to set the path where the text file should be saved?
Right now when you click 'Save' a pop up box comes up and the default folder is the project folder. I would like for the default to be D:\CallBack. I'm thinking the new line of code would be somewhere in these lines:
procedure TForm1.FormCreate(Sender: TObject);
begin
with OpenDialog1 do begin
Options:=Options+[ofPathMustExist,ofFileMustExist];
InitialDir:=ExtractFilePath(Application.ExeName);
Filter:='Text files (*.txt)|*.txt';
end;
with SaveDialog1 do begin
InitialDir:=ExtractFilePath(Application.ExeName);
Filter:='Text files (*.txt)|*.txt';
end;
Memo1.ScrollBars := ssBoth;
end;
Thanks.
I have created a memo box with a save button on a form. Does anyone know how to set the path where the text file should be saved?
Right now when you click 'Save' a pop up box comes up and the default folder is the project folder. I would like for the default to be D:\CallBack. I'm thinking the new line of code would be somewhere in these lines:
procedure TForm1.FormCreate(Sender: TObject);
begin
with OpenDialog1 do begin
Options:=Options+[ofPathMustExist,ofFileMustExist];
InitialDir:=ExtractFilePath(Application.ExeName);
Filter:='Text files (*.txt)|*.txt';
end;
with SaveDialog1 do begin
InitialDir:=ExtractFilePath(Application.ExeName);
Filter:='Text files (*.txt)|*.txt';
end;
Memo1.ScrollBars := ssBoth;
end;
Thanks.