如何在基于Web的应用程序上正确导入system.windows.forms? [英] How do I properly import system.windows.forms on a web-based application?

查看:151
本文介绍了如何在基于Web的应用程序上正确导入system.windows.forms?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在Visual Studio 2015(C#)上使用System.windows.forms并导入此类对我没用,请帮助。



我尝试了什么:



正常导入并查看微软网站。

解决方案

使用Windows.System.Forms的正常起点是生成一个Windows Forms项目,System.Windows.Forms将自动包含在其中(即'using'和reference) - 这不是假设您无法手动添加使用和引用正确的程序集,但您可能会错过其他依赖项



- 您说'Microsoft的网站'但不提供链接 - 我们无法看到您的屏幕,阅读您的想法,或者知道您所指的微软网站上的哪里

- 您是否为Windows.System添加了使用声明。表格?

- 您是否添加了对相关的引用ct汇编?



为什么你需要在Web应用程序中使用Windows窗体 - 你可能最好设计一个可以在Web应用程序中使用的预构建组件 - 但是就你所说的而言,它是一个'奇怪的'请求


可能需要将System.Windows.Forms.dll的副本添加到Web上的应用程序文件夹中服务器

I have been trying to use the System.windows.forms on Visual Studio 2015 (C#) and importing this class has not worked for me, please help.

What I have tried:

Importing like normal and looking on Microsoft's website.

解决方案

the normal starting point for using Windows.System.Forms is to generate a Windows Forms Project, and System.Windows.Forms would be included in that (ie, the 'using' and reference) automagically - thats not to say you can't add a using and a reference to the correct assembly manually, but you may miss other dependencies

- you say 'Microsoft's website' but dont provide a link - we cant see your screen, read your mind, or know 'where' on the vastness that is Microsoft's website you are referring to
- have you added a 'using' statement for Windows.System.Forms ?
- have you added a reference to the correct assembly ?

Why do you need a Windows Form in a Web application - you may be better off designing a pre-built component to use from the Web Application - but on the face of what you've said, its a 'odd' request


It could be necessary to add a copy of System.Windows.Forms.dll to your application folder on the web server.


这篇关于如何在基于Web的应用程序上正确导入system.windows.forms?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆