PrintControllerWithStatusDialog.OnStartPage 方法

此方法支持 .NET 基础结构,但不适合在代码中直接使用。

开始特定控制序列,该序列确定文档页的打印时间和打印方式。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Overrides Function OnStartPage ( _
    document As PrintDocument, _
    e As PrintPageEventArgs _
) As Graphics
用法
Dim instance As PrintControllerWithStatusDialog
Dim document As PrintDocument
Dim e As PrintPageEventArgs
Dim returnValue As Graphics

returnValue = instance.OnStartPage(document, e)
public override Graphics OnStartPage (
    PrintDocument document,
    PrintPageEventArgs e
)
public:
virtual Graphics^ OnStartPage (
    PrintDocument^ document, 
    PrintPageEventArgs^ e
) override
public Graphics OnStartPage (
    PrintDocument document, 
    PrintPageEventArgs e
)
public override function OnStartPage (
    document : PrintDocument, 
    e : PrintPageEventArgs
) : Graphics

参数

  • document
    PrintDocument,它表示当前正在打印的文档。

返回值

Graphics 对象,它表示 PrintDocument 中的一页。

备注

PrintControllerWithStatusDialog 类调用封装的 PrintControllerPrintController.OnStartPage 方法。

OnStartPage 方法恰好在 PrintDocument 引发 PrintPage 事件前调用。

OnStartPrint 方法创建发送到打印机的 Graphics 对象。调用 OnStartPrint 之后,OnStartPageGraphics 对象设置为单页图形。OnEndPage 方法清除 Graphics 对象,而 OnEndPrint 方法释放该对象。

使用 OnStartPage 可以设置文档页的打印方式。例如,可以对每一页的页面设置分别进行调整。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

PrintControllerWithStatusDialog 类
PrintControllerWithStatusDialog 成员
System.Windows.Forms 命名空间