简体   繁体   中英

Windows Form Application Inside An ASP.NET Page?

I have a game I made in windows form and an asp.net website(with a masterpage)

I made a new page in the website called game.aspx and I want that users could play the game inside the website (inside a frame, not another window)

It is possible to host a WinForms user control in a web page, but it is only supported in Internet Explorer, and even there the support is poor.

I would rather suggest that you package the game as a ClickOnce application that you deploy from your web site.

Edit:
If you REALLY want to do it you will find many examples on the web. Try this google search: http://www.google.com/search?q=user+control+host+winforms+web+page+html

This article from codebetter.com looks interesting for example: http://codebetter.com/petervanooijen/2007/06/18/including-a-winforms-user-control-in-an-asp-net-web-page/

If the game is HTML/JavaScript based then you're all set. But if the game is written in WinForms there is no way to host it from within a webpage without it being installed on the client's machine and using some kind of container (like ActiveX) and some fancy footwork.

You probably want to look at Silverlight or Flash or even HTML5. Implement your game in one of those and it can be played inside the client's browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM