procedure TForm1.Button1Click(Sender:
TObject); begin with TSaveDialog.Create(nil) do begin Filter:='Text files (*.txt)|*.txt)|All
Files(*.*)|*.*'; if Execute then Memo1.Lines.LoadFromFile(Filename); end; end;
//保存图片的对话框
procedure TForm2.Button1Click(Sender:
TObject); begin with TSaveDialog.Create(nil) do begin Filter:='JPEG
file(*.jpg;*.jpeg)|*.jpg;*.jpeg|PNG file(*.png)|*.png|Bitmap
file(*.bmp)|*.bmp|All
Files(*.*)|*.*'; if Execute then Image1.Picture.SaveToFile(Filename) end; end;