开发者

i want to print c# windows form by windows printer

开发者 https://www.devze.com 2023-04-12 21:59 出处:网络
I want to print c# windows form by printer.when i click print button i开发者_开发知识库n form, a print dialog should open just like whenwe give any notepad or doc file to print.and i should be able to

I want to print c# windows form by printer.when i click print button i开发者_开发知识库n form, a print dialog should open just like when we give any notepad or doc file to print.and i should be able to print the report or invoice.how to do it?


Use PrintDocument

http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument(v=VS.100).aspx

Hope this helps.

Edit:

Also see http://msdn.microsoft.com/en-us/library/system.windows.forms.printdialog.aspx if you are interested in dialog options.


check out http://msdn.microsoft.com/en-us/library/system.drawing.printing.aspx I think you will find what you need there


You can use reporting services to generate a report based on whatever values are on the screen and then use the ReportViewer control to display and print the file.

I can't give you much guidance on how to do that off the top of my head but you could google winforms reporting services print and see what comes up...

0

精彩评论

暂无评论...
验证码 换一张
取 消