Set WinForms RichTextBox as the source of a PrintDocument

守給你的承諾、 提交于 2019-12-24 09:33:08

问题


I want to print the contents of a RichTextBox, so I am trying make a PrintDocument out of the RichTextBox. But I dont find a way to convert a simple RichTextBox to a PrintDocument. Any ideas?


回答1:


There's quite an extensive article on this on MSDN, Getting WYSIWYG Print Results from a .NET RichTextBox: if that's TLDR then there's a condensed version as a kb article, How to print the content of a RichTextBox control by using Visual C# .NET or Visual C# 2005



来源:https://stackoverflow.com/questions/2268328/set-winforms-richtextbox-as-the-source-of-a-printdocument

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!