Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Back in .net 2 I was able to use System.Windows.Forms; inside a class. Now I am using vs 2010 and it seems I can not use
using System.Windows.Forms; inside a class. This is due to a business requirement.

Is this possible in .net 4?

Thanks
Posted
Updated 20-Sep-11 23:36pm
v2
Comments
Mehdi Gholam 21-Sep-11 5:41am    
What do you mean?
Mario Majčica 21-Sep-11 5:44am    
What the hell? :)
arkiboys 21-Sep-11 6:10am    
I am unable to add
using System.Windows.Forms; to a class
Is this possible in vs 2010 ?
Thanks

If you are unable to add
C#
using System.Windows.Forms;

to a class then the root cause is that your project has not referenced System.Windows.Forms in the references.

Add the references you need then it should work and you won't get compiler errors.
 
Share this answer
 
Comments
arkiboys 21-Sep-11 6:14am    
Solved. Thanks
Mehdi Gholam 21-Sep-11 6:24am    
If it is solved then mark it as solved, so other people will know.
You need to add the reference to System.Windows.Forms
 
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