本文介绍了PrintPreviewDialog页数受限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我遇到了一个很大的麻烦,情况是我想用C#打印一个可能有超过一千页的报表,而PrintPreviewDialog中的numericupdown控件的上限是1000页,我''一直在网上寻找,但我还没有发现任何有用的东西,我只找到了一些有关VB的答案.所以我的问题是:有什么办法可以在PrintPreviewDialog中更改numericupdown的此属性?希望您能回答,我将代码留在这里,以便您了解如何打开PrintPreviewDialog.谢谢!!

Well I have a really big trouble, the situation is that I want to print a report in C# that may have more than one thousand pages and the numericupdown control that is in the PrintPreviewDialog has a limit of 1000 pages, I''ve been looking in the web and I haven''t found anything usefull, I''ve only found some answers for VB. So my question is: Is there any way to change this property of the numericupdown in the PrintPreviewDialog??. Well hope your answer and I would left my code down here so you can see how I''m opening the PrintPreviewDialog. Thanks!!

PrintPreviewDialog pview = new PrintPreviewDialog();
pview.Document = Docum;
pview.PrintPreviewControl.StartPage = 0;
pview.WindowState = FormWindowState.Maximized;
((ToolStripButton)((ToolStrip)pview.Controls[1]).Items[0]).Enabled = false;
pview.ShowDialog(Form.ActiveForm);

推荐答案


这篇关于PrintPreviewDialog页数受限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 02:15
查看更多