MessageBox in ClassLibrary

  • Thread starter Thread starter Dan
  • Start date Start date
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?
 
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
 
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
 
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
 
Back
Top