MessageBox in ClassLibrary

D

Dan

I've created a ClassLibrary and need to show a messagebox at a certain point
in the code. The MessageBox class is in System.Windows.Forms, but when I
try to use that namespace, it isn't recognized. Are you allowed to use the
MessageBox class in a ClassLibrary. If not, how do you display messages?
 
?

=?ISO-8859-2?Q?Marcin_Grz=EAbski?=

Hi Dan,
I've created a ClassLibrary and need to show a messagebox at a certain point
in the code. The MessageBox class is in System.Windows.Forms, but when I
try to use that namespace, it isn't recognized. Are you allowed to use the
MessageBox class in a ClassLibrary. If not, how do you display messages?

Are you sure, you have added System.Windows.Forms reference
to your project reference list?

Marcin
 
B

BuddyWork

You can use the MessageBox in Class libraries, you will
need to add a reference into your project
for 'System.Windows.Forms' then you can you the MessageBox.
Thanks,
-----Original Message-----
I've created a ClassLibrary and need to show a messagebox at a certain point
in the code. The MessageBox class is in
System.Windows.Forms, but when I
 
D

Dan

Thanks...

BuddyWork said:
You can use the MessageBox in Class libraries, you will
need to add a reference into your project
for 'System.Windows.Forms' then you can you the MessageBox.
Thanks,

System.Windows.Forms, but when I
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top