1、在Form窗体中添加PopupMenu菜单组件,设计好组件。把Form窗体的PopupMenu属性改成你添加的PopupMenu菜单的名字。
2、在窗体中添加PrintDialog对话框组件。
代码如下:
procedure TForm1.MenuPrintClick(Sender: TObject);
begin
if PrintDialog1.Execute then
begin
ShowMessage(IntToStr(PrintDialog1.MinPage));
end;
end;
procedure TForm1.MenuExitClick(Sender: TObject);
begin
self.Close;
end;