I’ve got a service that’s acting up. It won’t recognize the following namespace declaration:
using System.Windows.Forms;
What I most need from the Windows.Forms namespace is a WebBrowser control. Any ideas on how to get this working? Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Add a reference to System.Windows.Forms in the project.
Here is how you do it: (copied from the user below – thankyou!):
you need to add reference to it’s assembly
right click your project node in solutions explorer and
choose AddReference –> .Net –>System.Windows.Forms
Just make sure that you don’t call MessageBox from your service. It is not a smart thing to do. (Yes, I have blocked services that way)