菜鸟求助:怎么弹出打印对话框

梦入神经 2014-02-11 04:44:09
就是浏览器按Ctrl+P弹出的对话框,怎么在delphi中弹出来,刚接触delphi不久,请讲得稍微详细点,不胜感激
...全文
368 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
梦入神经 2014-02-11
  • 打赏
  • 举报
回复
引用 6 楼 sololie 的回复:
TPrintDialog 控件在控件面板的 dialogs 分类中
终于弹出来了,但是和浏览器弹出的不太一样。非常感谢你,后面我在摸索一下。
sololie 2014-02-11
  • 打赏
  • 举报
回复
TPrintDialog 控件在控件面板的 dialogs 分类中
sololie 2014-02-11
  • 打赏
  • 举报
回复
你拖一个TPrintDialog 到TActiveFormX4 窗口上,起个名字例如 PrintDialog1 然后 procedure TActiveFormX4.showPrintDialog(x: Integer); begin PrintDialog1.Execute; end;
梦入神经 2014-02-11
  • 打赏
  • 举报
回复
引用 2 楼 sololie 的回复:
有 TPrintDialog、TPrinterSetupDialog 两个控件 都是显示一个打印相关的对话框,用它们的 execute 函数调用 PrintDialog1.Execute; PrinterSetupDialog1.Execute;
我直接可以这样写吗? procedure TActiveFormX4.showPrintDialog(x: Integer); begin PrintDialog1.Execute; end; PrintDialog1 提示这个没定义。实在是太菜了,但是工作中需要用到,
sololie 2014-02-11
  • 打赏
  • 举报
回复
例如拖一个TPrintDialog控件出来,拖一个button1出来 // button1 点击 procedure tform1.button1click(sender:tobject); begin if printdialog1.execute then begin // .... end; end;
sololie 2014-02-11
  • 打赏
  • 举报
回复
有 TPrintDialog、TPrinterSetupDialog 两个控件 都是显示一个打印相关的对话框,用它们的 execute 函数调用 PrintDialog1.Execute; PrinterSetupDialog1.Execute;
梦入神经 2014-02-11
  • 打赏
  • 举报
回复

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧