[第八章 工程地质勘察.ppt

  1. 1、本文档共27页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[第八章 工程地质勘察

第八章 打印系统的收费数据 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. 章节任务 任务:打印系统的收费收据 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. 章节目标 掌握PrintPreviewControl组件、PrintPreviewDialog组件、PrintDocument组件、PrintDialog组件和PageSetupDialog组件的使用方法。 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. 8.1 内容概述 打印是应用系统开发的一个重要用户功能,也是计算机数据输出的一个重要手段 在C#中,可使用PrintDocument组件进行打印,使用PrintPreviewDialog控件、PrintDialog和PageSetupDialog组件提供熟悉的Windows图形用户界面。 通常,要实现打印,一般先创建PrintDocument组件的一个实例,然后设置相关属性,定阅、完成PrintPage事件,通过PrintDialog由用户确定是否打印,如打印,则调用Print方法实际打印文档 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. 打印步骤如下: (1) 创建一个PrintDialog的实例 System.Windows.Forms.PrintDialog PrintDialog1=new PrintDialog (); (2) 创建一个PrintDocument的实例 System.Drawing.Printing.PrintDocument docToPrint = new System.Drawing.Printing.PrintDocument(); (3) 设置打印机开始打印的事件处理函数 void docToPrint_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) 在此事件中,将指定打印的全部内容。 (4) 将事件处理函数添加到PrintDocument的PrintPage事件中 docToPrint.PrintPage+=new PrintPageEventHandler(docToPrint_PrintPage); Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. (5) 设置PrintDocument的相关属性 PrintDialog1.AllowSomePages = true;PrintDialog1.ShowHelp = true; (6) 把PrintDialog的Document属性设为上面配置好的PrintDocument的实例 PrintDialog1.Document = docToPrint; (7) 调用PrintDialog的ShowDialog函数显示打印对话框 DialogResult result = PrintDialog1.ShowDialog(); (8) 根据用户的选择,开始打印 if (result==DialogResult.OK) { docToPrint.Print(); } Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyrigh

文档评论(0)

tiantiande + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档