Run WinForms control inside WebForms and take scre

2019-06-08 19:06发布

Like the title says, is it possible to run a winforms component inside a asp.net website and then take a screenshot of it?

2条回答
女痞
2楼-- · 2019-06-08 19:44

It is possible to place a user control on a web page but my experience with it in the past were really bad.

I tried this back in 2005 and it worked on Internet Explorer only, and even in a well-defined intranet there were machines where it failed.

So I would vote against.

For the screenshot part, please see this SO posting.

查看更多
一纸荒年 Trace。
3楼-- · 2019-06-08 19:46

Short answer: no. The ASP.NET runtime won't let you create a Form within its sandbox. Access to the Graphics library is also tied to WinForms, so I doubt that will be much help.

I would take a look at WPF; the XAML markups for layout of controls can be rendered in a forms app or a web browser, allowing you to create a web control that looks like a windows form control.

查看更多
登录 后发表回答