uses
Dialogs, ExtDlgs;
function DialogoParaElegirUnaImagen : string;
var
dlg: TOpenPictureDialog;
begin
dlg := TOpenPictureDialog.Create(nil);
with dlg do begin
InitialDir := 'C:\';
DefaultExt := 'jpg';
Options := [ofFileMustExist];
Title := 'Elige una imagen.';
try
if Execute then
Result := dlg.FileName;
finally
dlg.Free; end;
end; end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage( DialogoParaElegirUnaImagen );
end;