哪位大神有羞羞的铁拳 1080 云盘的百度云盘连接。

&&&&vc实现打印对话框程序
vc实现打印对话框程序
vc++编写的对话框输送打印机程序,实现对话框界面打印输出
若举报审核通过,可奖励20下载分
被举报人:
xiaogang012
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
VIP下载&&免积分60元/年(1200次)
您可能还需要
课程资源下载排行本帖子已过去太久远了,不再提供回复功能。用VC_6_0实现图像多种功能打印_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
用VC_6_0实现图像多种功能打印
上传于||文档简介
&&用VC_6_0实现图像多种功能打印
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
定制HR最喜欢的简历
你可能喜欢&&&代码实现报表打印
//初始化报表信息
private void SetReportInfo(string reportPath,string sourceName,DataTable dataSource,bool isFengPi)
if (!File.Exists(reportPath))
MessageBox.Show("报表文件:" + reportPath + " 不存在!","提示", MessageBoxButtons.OK, rmation);
if (dataSource == null || dataSource.Rows.Count == 0)
MessageBox.Show("没有找到案卷号为:"+txtArchiveNum.Text.Trim()+"的相关目录信息", "提示", MessageBoxButtons.OK, rmation);
LocalReport report1 = new LocalReport();
//设置需要打印的报表的文件名称。
report1.ReportPath = reportP
if (isFengPi)
//设置参数
string archveTypeName = GetArchiveTypeName();
ReportParameter archiveType = new ReportParameter("ArchiveType", archveTypeName);
report1.SetParameters(archiveType);
//创建要打印的数据源
ReportDataSource source = new ReportDataSource(sourceName, dataSource);
report1.DataSources.Add(source);
//刷新报表中的需要呈现的数据
report1.Refresh();
m_streams = new List&Stream&();
string deviceInfo ="&DeviceInfo&" +
&OutputFormat&EMF&/OutputFormat&" +
&PageWidth&21cm&/PageWidth&" +
&PageHeight&29.7cm&/PageHeight&" +
&MarginTop&2.0066cm&/MarginTop&" +
&MarginLeft&2.0066cm&/MarginLeft&" +
&MarginRight&2.0066cm&/MarginRight&" +
&MarginBottom&2.0066cm&/MarginBottom&" +
"&/DeviceInfo&";
//将报表的内容按照deviceInfo指定的格式输出到CreateStream函数提供的Stream中。
report1.Render("Image", deviceInfo, CreateStream, out warnings);
//声明一个Stream对象的列表用来保存报表的输出数据
//LocalReport对象的Render方法会将报表按页输出为多个Stream对象。
private List&Stream& m_
//用来提供Stream对象的函数,用于LocalReport对象的Render方法的第三个参数。
private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
//如果需要将报表输出的数据保存为文件,请使用FileStream对象。
Stream stream = new MemoryStream();
m_streams.Add(stream);
//用来记录当前打印到第几页了
private int m_currentPageI
#region 打印报表
private void Print()
m_currentPageIndex = 0;
if (m_streams == null || m_streams.Count == 0)
//声明PrintDocument对象用于数据的打印
PrintDocument printDoc = new PrintDocument();
//指定需要使用的打印机的名称,使用空字符串""来指定默认打印机
// printDoc.PrinterSettings.PrinterName = "";
//判断指定的打印机是否可用
if (!printDoc.PrinterSettings.IsValid)
MessageBox.Show("没有找到打印机!","提示",MessageBoxButtons.rmation);
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
//执行打印操作,Print方法将触发PrintPage事件。
printDoc.Print();
//释放资源
foreach (Stream stream in m_streams)
stream.Dispose();
stream.Close();
m_streams = null;
private void PrintPage(object sender, PrintPageEventArgs ev)
//Metafile对象用来保存EMF或WMF格式的图形,
//我们在前面将报表的内容输出为EMF图形格式的数据流。
m_streams[m_currentPageIndex].Position = 0;
Metafile pageImage = new Metafile(m_streams[m_currentPageIndex]);
//指定是否横向打印
ev.PageSettings.Landscape = false;
//这里的Graphics对象实际指向了打印机
ev.Graphics.DrawImage(pageImage, ev.PageBounds);
m_streams[m_currentPageIndex].Close();
m_currentPageIndex++;
//设置是否需要继续打印
ev.HasMorePages = (m_currentPageIndex & m_streams.Count);
#endregion
//打印封皮
private void btPrint_Click(object sender, EventArgs e)
string reportPath = Application.StartupPath + "\\Files\\ReportEnvelop.rdlc";
SetReportInfo(reportPath, "DataSet1", GetDataSource(true), true);
阅读(...) 评论()

我要回帖

更多关于 羞羞的铁拳 1080 云盘 的文章

 

随机推荐