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

Anthony Papillion papillion at gmail.com
Sat Jun 21 07:03:56 EDT 2008


Hello Everyone,

I'm pretty new to Mono. In fact, I downloaded and installed it on my Ubuntu
system last night and it looks very promising. The first thing I tried was a
simple 'Hello World' C# program to get the feel of the place and I
immediately ran into a showstopper.

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.

So, I dug around and found a post that said all the System.Windows.Forms
classes were implemented in System. Drawing. Guess what? No dice their
either. It's just not there.

So what am I missing? Just for your info I am using the latest build of
MonoDevelop and am creating a new C#/Gtk# project at the project selector.

Can someone give me a clue or point me in the direction of one?

Thanks in advance!

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


More information about the Mono-winforms-list mailing list