说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

请问openpicturedialog的用法?

编辑:说三道四文库 发布时间:2018-02-21 11:24
HTML文档下载 WORD文档下载 PDF文档下载
如何用openpicturedialog在窗体上显示一幅图片(*.jpg,*.bmp)?
在窗体上放一个image控件,然后写

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if openpicturedialog1.execute then
  form1.image1.Picture.loadfromfile(OpenPictureDialog1.filename);
end;
uses jpeg;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if openpicturedialog1.execute then
  form1.image2.Picture.loadfromfile(OpenPictureDialog1.filename);
end;

1)如果在窗体上显示一幅图片*.bmp
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if openpicturedialog1.execute then
  form1.image1.Picture.loadfromfile(OpenPictureDialog1.filename);
end;
2)如果在窗体上显示一幅图片*.jpg
uses jpeg;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if openpicturedialog1.execute then
  form1.image1.Picture.loadfromfile(OpenPictureDialog1.filename);
end;
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘