如何打印简单页面 [英] how to Print simple page
本文介绍了如何打印简单页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生,
我已经使用c Sharp画出了简单形式的打印图.在此表单上,我们给了lable,textbox,datagridview和combo-box这些都包括在此表单中.我也在datagridview中显示了记录.
Sir,
I have draw print out of simple form using c sharp. On this form we have given lable ,textbox,datagridview & combo-box all this include in this form.I have also show the record in datagridview.
推荐答案
您需要使用System.Drawing.Printing.PrintDocument
类;请参阅此MSDN帮助页面,其中包含简单的代码示例:
http://msdn.microsoft.com/en-us/library/system. drawing.printing.printdocument.aspx [ ^ ].
-SA
You need to use the classSystem.Drawing.Printing.PrintDocument
; please see this MSDN help page with a simple code sample:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^].
—SA
您可以尝试以下代码项目文章^ ]
You might try this codeproject article Form Print Control[^]
您是说打印一个字符串?连接所有值,然后打印它们?
您能更具体一点吗?
几个月前,我写了一篇教程,解释了如何从列表框中进行打印,如果要打印简单"字符串,可以遵循它.
最后一种方法,实际上是在其中构建打印字符串的位置,您可以根据表单中的值进行生成.
看看
http://codeabout.wordpress.com/2010/12/27 /print-from-a-listbox-using-c/ [
Do you mean print a string? Concatenate all values and then print them?
Can you be more specific?
A few months ago I wrote a tutorial explaining how to print from a list box, if you want to print a "simple" string, you can follow it.
Last method, where I actually build the print string, you can generate based on values you have in your form.
Take a look
http://codeabout.wordpress.com/2010/12/27/print-from-a-listbox-using-c/[^]
这篇关于如何打印简单页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文