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