cxImage控件使用

属性:

  Picture:载入要显示的图片

  Properties->Caption在没有内容的时候显示在图片框中间的文字

  Properties->PopupMenuLayout->MenuItems可选择需要显示在图片上的右键菜单命令

//载入图片
procedure
TForm1.Button2Click(Sender: TObject); begin if OpenDialog1.Execute then begin cxImage1.Picture.LoadFromFile(OpenDialog1.FileName); end; end;
//保存图片
procedure TForm1.Button3Click(Sender: TObject); begin if SavePictureDialog1.Execute then begin cxImage1.Picture.SaveToFile(SavePictureDialog1.FileName); end; end;
原文地址:https://www.cnblogs.com/liessay/p/5267221.html