Like the title says, is it possible to run a winforms component inside a asp.net website and then take a screenshot of it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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.