Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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.
Posted
Updated 18-Apr-16 21:10pm
Comments
Sergey Alexandrovich Kryukov 18-Apr-16 22:14pm    
What is "What does it mean, Web-based application? Are you talking about .NET on server side, or what?
What does it mean, "looking on Microsoft's website"?
What "this class"? System.Windows.Forms is not a class...
—SA
Dave Kreskowiak 18-Apr-16 23:45pm    
Ummm... WHY are you trying to use Windows Forms stuff in a web application? System.Windows.Forms is not a class but a namespace. What exactly are you trying to do with the classes in this namespace and why?
Shambhoo kumar 19-Apr-16 3:25am    
I don't why you are using windows application namespace in web Application but still you want to add this, please add assembly reference first for using this namespace.

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
 
Share this answer
 
v2
It could be necessary to add a copy of System.Windows.Forms.dll to your application folder on the web server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900