• 大小: 0.07M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: C#  打印  

资源简介

簡單的打印案例

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PrintData
{
    public partial class Frm_Main : Form
    {
        public Frm_Main()
        {
            InitializeComponent();
        }

        private void printDocument1_PrintPage(object sender System.Drawing.Printing.PrintPageEventArgs e)
        {
            e.Graphics.DrawString(//使用DrawString方法绘制字符串
                lb_Name.Text new Font(“宋体“ 10 Fontstyle.Regular) Brushes.Black 0 0);
            e.Graphics.DrawString(//使用DrawString方法绘制字符串
                txt_Name.Text new Font(“宋体“ 10 Fontstyle.Regular) Brushes.Black 60 0);
            e.Graphics.DrawString(//使用DrawStrin

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-12-02 00:22  PrintData\
     目录           0  2011-12-02 00:22  PrintData\PrintData\
     文件         917  2010-10-20 10:45  PrintData\PrintData.sln
     目录           0  2011-04-06 10:07  PrintData\PrintData\bin\
     目录           0  2011-12-02 00:22  PrintData\PrintData\bin\Debug\
     文件       21504  2010-10-25 08:48  PrintData\PrintData\bin\Debug\PrintData.exe
     文件       28160  2010-10-25 08:48  PrintData\PrintData\bin\Debug\PrintData.pdb
     文件        1847  2010-10-25 09:52  PrintData\PrintData\Frm_Main.cs
     文件        7585  2010-10-20 11:36  PrintData\PrintData\Frm_Main.designer.cs
     文件       21937  2010-10-20 11:36  PrintData\PrintData\Frm_Main.resx
     目录           0  2011-04-06 10:07  PrintData\PrintData\obj\
     目录           0  2011-12-02 00:22  PrintData\PrintData\obj\Debug\
     文件        1109  2010-10-20 10:48  PrintData\PrintData\obj\Debug\PrintData.csproj.FileListAbsolute.txt
     文件         850  2010-10-22 12:55  PrintData\PrintData\obj\Debug\PrintData.csproj.GenerateResource.Cache
     文件       21504  2010-10-25 08:48  PrintData\PrintData\obj\Debug\PrintData.exe
     文件       10728  2010-10-22 12:55  PrintData\PrintData\obj\Debug\PrintData.Frm_Main.resources
     文件       28160  2010-10-25 08:48  PrintData\PrintData\obj\Debug\PrintData.pdb
     文件         180  2010-10-20 10:45  PrintData\PrintData\obj\Debug\PrintData.Properties.Resources.resources
     文件        1390  2010-10-20 10:43  PrintData\PrintData\obj\Debug\PrintFormData.csproj.FileListAbsolute.txt
     文件         855  2009-03-13 13:52  PrintData\PrintData\obj\Debug\PrintFormData.csproj.GenerateResource.Cache
     文件       20992  2009-03-13 13:52  PrintData\PrintData\obj\Debug\PrintFormData.exe
     文件       22016  2009-03-13 13:52  PrintData\PrintData\obj\Debug\PrintFormData.pdb
     文件       10728  2009-03-13 13:52  PrintData\PrintData\obj\Debug\PrintFormData.PrintFormData.resources
     文件         180  2009-03-13 13:52  PrintData\PrintData\obj\Debug\PrintFormData.Properties.Resources.resources
     目录           0  2011-04-06 10:07  PrintData\PrintData\obj\Debug\Refactor\
     目录           0  2011-04-06 10:07  PrintData\PrintData\obj\Debug\TempPE\
     文件        4608  2010-10-20 10:45  PrintData\PrintData\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
     文件        3870  2010-10-20 10:45  PrintData\PrintData\PrintData.csproj
     文件         493  2010-10-20 10:45  PrintData\PrintData\Program.cs
     目录           0  2011-12-02 00:22  PrintData\PrintData\Properties\
     文件        1350  2010-10-20 10:45  PrintData\PrintData\Properties\AssemblyInfo.cs
............此处省略4个文件信息

评论

共有 条评论