现在的位置: 首页 > 综合 > 正文

打印文档

2013年02月18日 ⁄ 综合 ⁄ 共 7240字 ⁄ 字号 评论关闭
  1using System;
  2using System.Drawing;
  3using System.Collections;
  4using System.ComponentModel;
  5using System.Windows.Forms;
  6using System.Data;
  7// 新添加的命名空间。
  8using System.Drawing.Printing;
  9using System.IO;
 10
 11namespace PrintDoc
 12{
 13    /// <summary>
 14    /// 打印文档。
 15    /// </summary>

 16    public class Form1 : System.Windows.Forms.Form
 17    {
 18        private System.Windows.Forms.MainMenu mainMenu1;
 19        private System.Windows.Forms.RichTextBox richTextBox1;
 20        private System.Windows.Forms.MenuItem menuItem1;
 21        private System.Windows.Forms.MenuItem menuItem2;
 22        private System.Windows.Forms.MenuItem menuItem3;
 23        private System.Windows.Forms.MenuItem menuItem4;
 24        private System.Windows.Forms.MenuItem menuItem5;
 25        private System.Windows.Forms.PrintDialog printDialog1;
 26        private System.Drawing.Printing.PrintDocument printDocument1;
 27        private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
 28        private System.Windows.Forms.MenuItem menuItem6;
 29        /// <summary>
 30        /// 必需的设计器变量。
 31        /// </summary>

 32        private System.ComponentModel.Container components = null;
 33
 34        public Form1()
 35        {
 36            //
 37            // Windows 窗体设计器支持所必需的
 38            //
 39            InitializeComponent();
 40
 41            //
 42            // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
 43            //
 44        }

 45
 46        /// <summary>
 47        /// 清理所有正在使用的资源。
 48        /// </summary>

 49        protected override void Dispose( bool disposing )
 50        {
 51            if( disposing )
 52            {
 53                if (components != null
 54                {
 55                    components.Dispose();
 56                }

 57            }

 58            base.Dispose( disposing );
 59        }

 60
 61        Windows Form Designer generated code

抱歉!评论已关闭.