OpenDialog获取文件名

//OpenDialog获取文件

procedure TForm2.Button1Click(Sender: TObject);

begin

  File_Path:='';

  if OpenDialog1.Execute then File_Path:=OpenDialog1.FileName;

  if Length(File_Path)>0 then

     Edit1.Text:=OpenDiaLog1.FileName;

end;

原文地址:https://www.cnblogs.com/sidely/p/3759031.html