什么是HasMorePages的PrintPageEventArgs属性在做什么呢? [英] What does Hasmorepages PrintPageEventArgs property do exactly?

查看:507
本文介绍了什么是HasMorePages的PrintPageEventArgs属性在做什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解HasMorePages的PrintPageEventArgs财产,为什么要使用它,它是如何工作的。

I am trying to understand what Hasmorepages PrintPageEventArgs property is, why would you use it and how does it work.

MSDN库并没有真正有一个很好的解释。所有他们说的是,如果将其设置为true,PrintPage事件再次调用。是不是意味着对自身的事件循环没有留下或离开,并再次调用自身,或依赖于你再次调用PrintPage事件?

MSDN Library doesn't really have a good explanation. All they say is that if you set it to true, printpage event is called again. Is that mean the event loops on itself without leaving or leaves and calls itself again or relies on you to call the printpage event again?

我只是想了解PrintPageEventArgs.hasmorepages财产。任何提示或帮助将大大AP preciated。

I am just trying to understand PrintPageEventArgs.hasmorepages property. Any hints or help will be greatly appreciated.

感谢您,

推荐答案

HasMorePages的是一个布尔属性的 PrintPageEventArgs 您收到作为事件的参数。在打印当前页面后,将其设置为如果有更多的页面打印,或如果当前页是最后一个。

HasMorePages is a boolean property of the PrintPageEventArgs you receive as a parameter of the event. You set it to True after printing the current page if there are more pages to be printed, or False if the current page is the last one.

事件总是要求你的东西在框架中,并永远应该是由您直接调用。他们的事件的,这意味着他们派出来告诉你,事情已经发生了,给你一个机会作出回应或反应。

Events are always called for you by something in the framework, and are never supposed to be called directly by you. They are events, which mean they're dispatched to tell you that something has happened and give you a chance to respond or react.

如果您将其设置为的PrintPage 事件再次自动调用;你不自己调用它。 (这正是MSDN文档说:如果设置为true,PrintPage事件的又被称为这并不是说的你需要再次调用它的。 - 它说的再次调用的)

If you set it to True, the PrintPage event is called again automatically; you do not call it yourself. (That's exactly what the MSDN documentation says: If you set it to true, the printpage event is called again. It doesn't say you'll need to call it again - it says is called again.)

ev.HasMorePages := DoYouHaveMorePagesToPrint;

有关事件的VB.NET的例子,以及如何使用 ev.HasMorePages ,见<一href="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=VS.71%29.aspx"相对=nofollow> MSDN文档的PrintDocument 。有关 PrintPageEventArgs 信息,请参阅<一href="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs%28v=vs.71%29.aspx"相对=nofollow>这个MSDN页面,其中有一个链接到<一个href="http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs_members%28v=vs.71%29.aspx"相对=nofollow>成员PrintPageEventArgs (包括 HasMorePages的)。

For a VB.NET example of the event and how to use ev.HasMorePages, see the MSDN documentation for PrintDocument. For info on PrintPageEventArgs, see this MSDN page, which has a link to the members of PrintPageEventArgs (including HasMorePages).

这篇关于什么是HasMorePages的PrintPageEventArgs属性在做什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆