将文本框的文本(包含不同字体和颜色的不同字符)转换为图像或图片框
我正在 vb.net 中做项目 我正在使用一个富文本框,我可以在其中设置不同字体(名称、大小、粗体、斜体、下划线)、颜色到不同的选定文本。 我能够在富文本框中执行此操作,但我想创建具有不同字体样式和样式的不同文本的位图(或分配给图片框)颜色,但我得到的字体并不像图像中的文本框那样。 有没有什么方法可以将富文本框文本直接转换为包含不同字体样式和样式的图像?不同文本的颜色。
输出应如下图所示...
I am doing project in vb.net
I am using a Rich text box on which i can set different font (name,size,bold,italic,underline),color to different selected text.
I am able to do this in Rich textbox but i want to create bitmap (or assign to picturebox) of this of different text with different font style & color but i am getting not much font as like textbox in image..
Is there any method to convert Rich textbox text directly to image which contain different font style & color for different text.
output should like following image....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查看这篇文章。
http://stpetrus27.wordpress.com/2011/08/ 24/c-rtf-to-image/
它应该为您提供您需要的内容。
Kindly take a look at this article.
http://stpetrus27.wordpress.com/2011/08/24/c-rtf-to-image/
It should provide you with what you need.