简体   繁体   English

Windows窗体应用程序内的ASP.NET页?

[英]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) 我有一个用Windows窗体制作的游戏和一个asp.net网站(带有母版页)

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) 我在网站上创建了一个名为game.aspx的新页面,我希望用户可以在网站内(在框架内,而不是在另一个窗口内)玩游戏。

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. 可以在网页中托管WinForms用户控件,但仅Internet Explorer支持该控件,甚至那里的支持也很差。

I would rather suggest that you package the game as a ClickOnce application that you deploy from your web site. 我宁愿建议您将游戏打包为从网站部署的ClickOnce应用程序。

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 尝试以下Google搜索: 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/ 例如,来自codebetter.com的这篇文章看起来很有趣: http ://codebetter.com/petervanooijen/2007/06/18/includes-a-winforms-user-control-in-an-asp-net-web-page/

If the game is HTML/JavaScript based then you're all set. 如果游戏是基于HTML / JavaScript的,那么您已经准备就绪。 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. 但是,如果游戏是用WinForms编写的,则没有将它安装在客户端计算机上并使用某种容器(例如ActiveX)和一些花哨的方法就无法从网页中托管它的方法。

You probably want to look at Silverlight or Flash or even HTML5. 您可能想看一下Silverlight或Flash甚至HTML5。 Implement your game in one of those and it can be played inside the client's browser. 用其中一种实现您的游戏,并且可以在客户端的浏览器中进行游戏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 简单的Windows Web窗体应用程序转换为asp.net应用程序 - Simple Windows web form application to asp.net application 在Windows窗体应用程序中运行ASP.NET项目? - Run ASP.NET project inside a Windows Forms Application? 将Windows窗体屏幕截图应用程序转换为ASP.NET - Convert Windows Form Screenshot Application To ASP.NET 从asp.net页面运行Windows窗体应用程序 - Run windows form app from asp.net page HOW TO:在特定页面上的asp.net窗体Windows身份验证 - HOW TO: asp.net form windows authentication on the specific page 如何将数据从Windows窗体应用程序发送到Asp.Net Web服务应用程序 - How to send data from a Windows Form Application to a Asp.Net Web Service Application Windows窗体应用程序中的SqlDependency很快,但是在ASP.net MVC应用程序中却很慢 - SqlDependency in Windows Form application is fast, but it is slow in ASP.net MVC application 当ASP.NET应用程序适用于Windows窗体应用程序时,无法加载AForge.Video.FFMPEG - Unable to load AForge.Video.FFMPEG for ASP.NET application when it worked for a Windows Form application 在ASP.net网页中嵌入Windows窗体 - Embedding Windows Form in an ASP.net webpage 将Windows窗体应用程序转换为Asp.net - Convert Windows Forms application into Asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM