将文本框的文本(包含不同字体和颜色的不同字符)转换为图像或图片框

发布于 2024-12-21 01:35:39 字数 350 浏览 3 评论 0原文

我正在 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....

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小霸王臭丫头 2024-12-28 01:35:39

请查看这篇文章

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文