Hi, KLessou
Thanks for your answer, I have fix the problem. But once more problem was 
appeared:

I tried to do something with events (button clicked). Compiled successfully, 
but error at runtime like this:

D:\lab01\ChatClient>mono Client.exe
Button press
Stacktrace:

  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x00007>
  at MainApplication.Main (string[]) <0x0002e>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object
,intptr,intptr,intptr) <0xffffffff>

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.



and here is the code:

using System;

using System.Net;

using System.Net.Sockets; 

using System.Text; //

using System.Threading; 

using Gtk;

using Glade;

public class MainWindow

{


public MainWindow()

{

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

gxml.Autoconnect(this);

gxml["MainWindow"].ShowAll(); 

btnConnect.Clicked += new EventHandler(OnPressBtnConnect);


}

[Widget]  Button btnConnect;



public void OnPressBtnConnect(object sender, EventArgs e)

{

Console.WriteLine("Button press");

}

public class MainApplication

{

public static void Main(string[] args)

{

Application.Init();

MainWindow mw = new MainWindow();

Application.Run();

}

}
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to