应用程序不打印 [英] Application Not Printing
本文介绍了应用程序不打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI,我已经开发了Windows应用程序,并向其添加了打印功能,但是无法打印.出现打印对话框,但是当调用打印按钮时,什么也没有发生.
以下是我的代码:
HI , I have developed a windows application and added print functionality to it , but it does not print. The print dialog box appears but when the print button is invoked , nothing happens.
Below is the code I have :
private void toolStripPrintBtn_Click(object sender, EventArgs e)
{
if(listViewPageViewer.Items.Count > 0)
{
for (int i = 0; i < listViewPageViewer.Items.Count; i++)
{
if (listViewPageViewer.Items[i].Selected)
//i have also tried .Checked instead of .Selected
{
printDialog.ShowDialog();
}
}
}
}
在此先感谢
Thanks in Advance
推荐答案
嘿里卡多,
首先,如果技术无法打印,则您尚未从技术上添加该功能. :-D heheh ...
认真地说,显示对话框并不表示您已已调用打印作业 [ ^ ].您将需要一些其他代码才能将文档发送到打印机.
干杯.
Hey Riccardo,
First off, you''ve not technically added the functionality if it doesn''t print. :-D heheh...
In all seriousness, showing the dialog doesn''t mean that you''ve invoked the print job[^]. You''ll need some other code there to get the document to the printer.
Cheers.
这篇关于应用程序不打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文