没有合适的资源?快使用搜索试试~ 我知道了~
WinForm 打印类
4星 · 超过85%的资源 需积分: 10 10 下载量 89 浏览量
2009-03-30
09:35:19
上传
评论 1
收藏 21KB TXT 举报
温馨提示
试读
25页
老外写的winform打印类(很好用,已经测试).................
资源推荐
资源详情
资源评论
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using System.Data;
using System.Windows.Forms;
class DataGridViewPrinter
{
private DataGridView TheDataGridView; // The DataGridView Control which will be printed
private PrintDocument ThePrintDocument; // The PrintDocument to be used for printing
private bool IsCenterOnPage; // Determine if the report will be printed in the Top-Center of the page
private bool IsWithTitle; // Determine if the page contain title text
private string TheTitleText; // The title text to be printed in each page (if IsWithTitle is set to true)
private Font TheTitleFont; // The font to be used with the title text (if IsWithTitle is set to true)
private Color TheTitleColor; // The color to be used with the title text (if IsWithTitle is set to true)
private bool IsWithPaging; // Determine if paging is used
static int CurrentRow; // A static parameter that keep track on which Row (in the DataGridView control) that should be printed
static int PageNumber;
private int PageWidth;
private int PageHeight;
private int LeftMargin;
private int TopMargin;
private int RightMargin;
private int BottomMargin;
private float CurrentY; // A parameter that keep track on the y coordinate of the page, so the next object to be printed will start from this y coordinate
private float RowHeaderHeight;
private List<float> RowsHeight;
private List<float> ColumnsWidth;
剩余24页未读,继续阅读
资源评论
- 阿贵1212013-07-29使用了一下,好不错啊
kalaicheng
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功