在图片的
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if button=mbRight then
PopupMenu1.Popup(iamge1.left+10,iamge1.top-10);
end;
在右键菜单的单击事件中:
if OpenPictureDialog1.Execute then
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);