打印问题

donger2000 2003-08-07 03:08:16
自已用代码产生的printDocument如何才能只打印在printDialog设定的起始页和终止页范围内的几页内容?
...全文
122 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wd_318 2003-08-08
  • 打赏
  • 举报
回复
up
wd_318 2003-08-08
  • 打赏
  • 举报
回复
The PrintRange property is used by the PrintDialog.when the user selects a print range. The default PrintRange is AllPages. To allow the user to specify a range of pages to print, the PrintDialog.AllowSomePages property must be set to true. To allow the user to specify the selected pages to print, the PrintDialog.AllowSelection property must be set to true.

During the printing process, in the PrintDocument.PrintPage event, check the PrintRange to see what should be printed. If PrintRange is PrintRange.SomePages, use the FromPage and ToPage properties to determine what pages should be printed. If PrintRange is PrintRange.Selection, then specify output only for the selected pages.

The FromPage, ToPage and PrintRange can also be set programmatically, though the PrintDocument.PrintPage implementation is the same.

donger2000 2003-08-07
  • 打赏
  • 举报
回复
顶!!!!!!!!!!!!!!!!!!!
wd_318 2003-08-07
  • 打赏
  • 举报
回复
UP
donger2000 2003-08-07
  • 打赏
  • 举报
回复
再顶!!!!!!!!!!

111,096

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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