首页 > 技术文章 > OpenDialog获取文件名

sidely 2014-05-29 14:15 原文

//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;

推荐阅读