将HTML嵌入到C#表单中

编程入门 行业动态 更新时间:2024-10-14 14:19:28
本文介绍了将HTML嵌入到C#表单中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有没有将HTML嵌入到窗体自定义用户控件中的方法?我想创建一个用于.NET 4.0应用程序的轻量级控件,但由于它的内容是可行的,所以我认为使用HTML来布局它可能是最简单的。有没有办法在Windows窗体中实现这一点? C#和HTML还有其他一些主题,但非常确定的是,不涉及创建一个解析HTML并显示它的控件。

谢谢 您可以使用 WebBrowser ,但我建议不要走这条路。只需使用传统的控件来完成你所需要的,如果可能的话,可能还会结合一些GDI +。

Is there a way to embed HTML into a windows forms custom usercontrol? I want to create a lightweight control to be used in a .NET 4.0 application, but since the contents of it is viable to change, I was thinking using HTML to lay it out might be easiest. Is there a way to achieve this in windows forms? There are some other topics with C# and HTML but pretty sure non involves creating a control that parses HTML and displays it.

Thanks

解决方案

You could use a WebBrowser, but I'd recommend not going down that path. Just use traditional controls to accomplish what you need, if at all possible, maybe combined with a little GDI+.

更多推荐

将HTML嵌入到C#表单中

本文发布于:2023-11-05 18:40:12,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!