本文介绍了ASP.NET 页面中的 Windows 窗体应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个以 windows 形式制作的游戏和一个 asp.net 网站(带有母版)

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

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

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)

推荐答案

可以在网页中承载 WinForms 用户控件,但它仅在 Internet Explorer 中受支持,即使在那里支持也很差.

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.

我宁愿建议您将游戏打包为从您的网站部署的 ClickOnce 应用程序.

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


如果你真的想这样做,你会在网上找到很多例子.试试这个谷歌搜索:http://www.google.com/search?q=user+control+host+winforms+web+page+html

来自 codebetter.com 的这篇文章看起来很有趣,例如:http://codebetter.com/petervanooijen/2007/06/18/include-a-winforms-user-control-in-an-asp-net-web-page/

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/

这篇关于ASP.NET 页面中的 Windows 窗体应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 07:13