Question about MessageBox()
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
===============================================================
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