OpenDialog获取文件名时间:2023-03-09 08:47:27 //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;