procedure TfrmMain.mnuSaveClick(Sender: TObject);
begin
if SavePictureDialog1.Execute then
Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
end;
这样写指能保存白板的文件1没有扩展名,如何改才能正常保存1.jpg的图片呢
begin
if SavePictureDialog1.Execute then
Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
end;
这样写指能保存白板的文件1没有扩展名,如何改才能正常保存1.jpg的图片呢
解决方案 »
- delphi中的TreeView和DBGrid
- 奇怪的问题,为啥释放了不为nil呢?
- 关于delphi中的打印问题?
- 请问,如何USES引入WMPLib和RealAudioObjects_TLB?
- 一个简单的fastreport问题,解决了分拿去.
- 在C#中数据库查询的内容如何组织成XML让DELPHI得到?
- about excel转为文本的问题?
- 请教这个网站如何登陆,我总是登陆不了,用idhttp登陆,或者用webbrowser登陆获取cookie,再用idhttp去get,位登陆状态就OK
- 请问我如何查找这样的记录?
- 寻找和TSuperGrid for Delphi5 或功能与之相似的控件?
- delphi 主窗体关闭出错
- 怎样改变TreeView1的宽度。
SaveDialog1.Options := [ofOverwritePrompt];
SaveDialog1.Filter := 'JPG (*.jpg)|*.jpg';
SaveDialog1.FilterIndex := 1; { start the dialog showing all files }
SaveDialog1.DefaultExt := 'jpg';
SaveDialog1.FileName := '';
if SaveDialog1.Execute then
Image1.Picture.SaveToFile(SaveDialog1.FileName);
出错 : Build
[Error] Unit1.pas(80): Undeclared identifier: 'SaveDialog1'
[Error] Unit1.pas(80): Missing operator or semicolon
[Error] Unit1.pas(81): Missing operator or semicolon
[Error] Unit1.pas(82): Missing operator or semicolon
[Error] Unit1.pas(83): Missing operator or semicolon
[Error] Unit1.pas(84): 'THEN' expected but identifier 'Execute' found
[Error] Unit1.pas(91): Statement expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
ID 图片名 图片内容
ID PICNAME PICNY
OpenDialog1.FilterIndex := 2;打开对话框时显示的类型是 All files (*.*)|*.*