[Mono-winforms-list] Question about MessageBox()

Anthony Papillion papillion at gmail.com
Sun Jun 22 17:29:02 EDT 2008


On Sat, Jun 21, 2008 at 7:33 AM, Sandy Armstrong <sanfordarmstrong at gmail.com
>te:
<snip>
> > All I wanted to do was to display a messagebox. So I used typical .NET
> > syntax as:
> >
> > MessageBox.Show("Hello C# World!", "Hello World", MessageBoxButtons.OK,
> > MessageBoxIcon.Exclamation);
> >
> > When I tried to compile it, I was told that the system didn't know what
> > MessageBox was in the current context. When I tried to add a reference
to
> > the System.Windows.Forms I couldn't do it as the MonoDevelop enviroment
had
> > no idea what I was talking about and told me the type or namespace
didn't
> > exist.
>
> First, do you have libmono-winforms2.0-cil installed?
>
> Second, did you remember to add a System.Windows.Forms reference to
> the project itself?
>
> Third, do you have the correct using statements in you C# files?
>
> Sandy

Hi Sandy,

I don't think I did install libmono-winforms2.0-cil at all. I assumed that
everything would be installed when I installed MonoDevelop. I'll try that
today. I also didn't add a reference to the library in the project so that
would be a problem too.

Finally, I at least did get the using statements right (I think). I added:

using System.Windows.Forms;

to the using area of the file. Is this right?

Anyway, thank you for the help. I'll give  it a try and see what happens!

Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20080622/cdef1440/attachment.html 


More information about the Mono-winforms-list mailing list