[Gtk-sharp-list] Help me with the first application!

Duong Nguyen duongnguyen at mail.ru
Tue Dec 5 07:54:00 EST 2006


Hello,

I am a beginer in Gtk#. As read some examples from mono-website, I wrote my first simple application and try to compile with

mcs myfile.cs -pkg:gtk-sharp -pkg:glade-sharrp

the program is compiled without error, but when  I run it, no GUI is displayed, only the text from Console.WriteLine is displayed. I have setup Gtk# runtime, Mono in my computer. 

Pls help me to get to know the problem.

Thanks in advance!



using System;

using Gtk;

using Glade;

public class MainWindow

{

public MainWindow()

{

Glade.XML gxml = new Glade.XML("gui.glade", "MainWindow", "");

gxml.Autoconnect(this);

}

}

public class MainApplication

{

public static void Main(string[] args)

{

Application.Init();

MainWindow mw = new MainWindow();

Console.WriteLine("You're here!");

Application.Run();

}

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20061205/dc0ecb14/attachment.html 


More information about the Gtk-sharp-list mailing list