I'm using opendialog to get a file name and put it in a string var (i dont need to load the file into memory, I only need the file name):
procedure TForm1.button1Click(Sender: TObject);
var
n: string;
begin
if opendialog1.Execute then
n:= opendialog1.FileName;
end;
It works well, but I get a error when I try to perform any file operations (like read or write to any file) after the use of opendialog.
Exists another way that I can select a filename without using the opendialog?
procedure TForm1.button1Click(Sender: TObject);
var
n: string;
begin
if opendialog1.Execute then
n:= opendialog1.FileName;
end;
It works well, but I get a error when I try to perform any file operations (like read or write to any file) after the use of opendialog.
Exists another way that I can select a filename without using the opendialog?