Hi,

Below is a very simple piece of code which I'm still trying to compile -
but all I get is an error (error CS0029: Cannot convert implicitly from
`System.Drawing.Size' to `Gdk.Size').

How do I fix this problem?

TTFN

Paul

8---->

using Gtk;
using GtkSharp;
using System;
using System.Drawing

public class MyButton
{
  public static void Main(string [] args)
  {
     Application.Init();
     Window win = new Window("My first button");
     win.DefaultSize = new Size(200, 200);
     Button btn = new Button("Click");
     win.Add(btn);
     win.ShowAll();
     Application.Run();
   }
}

mcs gtksharp.cs -r System.Drawing -pkg:gtk-sharp
gtksharp.cs(11) error CS0029: Cannot convert implicitly from `System.
Drawing.Size' to `Gdk.Size'
Compilation failed: 1 error, 0 warnings

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to