You are not logged in.
Pages: 1
Hi !
I get this message, when I want use System.Drawing and System.Windows.Forms
latest mono,monodevelop,gtk-sharp etc.
Code:
using System;
using System.Drawing;
using System.Windows.Forms;
public class HelloWorld : Form
{
static public void Main ()
{
Application.Run (new HelloWorld ());
}
public HelloWorld ()
{
Button b = new Button ();
b.Text = "Click Me!";
b.Click += new EventHandler (Button_Click);
Controls.Add (b);
}
private void Button_Click (object sender, EventArgs e)
{
MessageBox.Show ("Button Clicked!");
}
}
Error message:
(2,7): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
(2,1): error CS0246: The type or namespace name `System.Drawing' could not be found. Are you missing a using directive or an assembly reference?
(3,7): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
(3,1): error CS0246: The type or namespace name `Windows.Forms' could not be found. Are you missing a using directive or an assembly reference?
Build complete -- 4 errors, 0 warnings
---------------------- Done ----------------------
ERROR: MonoDevelop could not find the Gtk# 2.0 development package. Compilation of projects depending on Gtk# libraries will fail. You may need to install development packages for gtk-sharp-2.0.
Build: 4 errors, 0 warnings
thx
Last edited by subset (2007-12-09 20:37:07)
Offline
Try downloading the Gtk# 2.0 devel package.
Also, C# sucks.
Offline
Pages: 1