All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Microsoft,SQL,Server,2008,Express版本_mssql学习_编程技术
在.net,App中集成COM组件的一些简单技巧_.net资料_编程技术
在asp.net,页面中加入skype功能_.net资料_编程技术
.Net业务平台的数值精度陷阱与解决方法_.net资料_编程技术
asp.net全局异常处理_[Asp.Net教程]
用javascript实现评估用户输入密码的强度_JavaScript技术_编程技术
C#中ListBox控件应用实例
XHTML+CSS标准网页-调用样式表_[Html教程]
fastm设计思路深度剖析_php资料_编程技术
用SQL语句删除重复记录的四种方法_[SQL Server教程]
Reading number is top 10 pictures
2012 national geographic daily picture6
Look at the Spring Festival people crowded into the what kind
The little woman's bright wire3
教你做读书笔记
Rendez-vous Sleep with actress, three days to earn 600000
红楼梦金陵十二钗(2)
夕阳下的北京街道
2015中美最新武器装备巅峰对决!
Female model behind the bitterness, often being overcharged1
恶搞漫画1
Download software ranking
Sora aoi‘s film--Lust fan wall
Unix video tutorial20
Visual C++界面编程技术
Unix video tutorial10
在线棋牌游戏3.05版
Desire a peach blossom
终极变速大师Speeder3.26
SP4 for SQL2000
Unix video tutorial5
matrix1
qq published in(发表于) 2014/7/11 9:17:48 Edit(编辑)
C#中PrintDocumentPrintDocument组件的事件使用实例

C#中PrintDocumentPrintDocument组件的事件使用实例

C#中PrintDocumentPrintDocument组件的事件使用实例|方法

PrintDocument组件的事件

下面介绍PrintDocument组件的常用事件,如表1所示。

下面详细介绍PrintPage事件。

当需要为当前页打印输出时发生。

语法:

public event PrintPageEventHandler PrintPage

这些事件中最常用的是PrintPage事件,该事件应当与PrintPageEventHandle参数委托的签名匹配。例如:

Public delegate void PrintPageHandler(object sender,PrintPageEventArgs e);

PrintPageEventArgs参数为打印提供必要的系统数据,相关参数及说明如表2所示。

Graphics参数是PrintPageEventArgs参数的成员,包含一个Graphics对象用来绘制将要打印的文字和图像。

语法:

public Graphics Graphics { get; }

这些参数中最重要、最常用的是Graphics属性,它用来绘制写到屏幕或打印机的文字或图形。

例如:

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)

{

e.Graphics.FillRectangle(Brushes.Red, new Rectangle(150, 500, 500, 500));

}



表1 PrintDocument对象常用事件及说明



表2 PrintPageEventArgs参数列表及说明




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.