Hi!
I'm create a simple winforms application and when I'm running it the program crashes.
Source kk.cs:
using System.Windows.Forms;


class mywin:Form {
   public mywin() {
       this.Show();
   }
   public static void Main() {
       Application.Run(new mywin());
   }
}

compilation and test:
[EMAIL PROTECTED] ~]$ mcs kk.cs -r:System.Windows.Forms
[EMAIL PROTECTED] ~]$ mono kk.exe
Mono System.Windows.Forms Assembly [Revision: 41731; built: 2005/2/15 5:56:12]
Keyboard layout not recognized


Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.NullReferenceException: Object reference not set to an instance of an object
in <0x003a1> System.Windows.Forms.X11Keyboard:CreateConversionArray (System.Windows.Forms.KeyboardLayout layout)
in <0x00071> System.Windows.Forms.X11Keyboard:.ctor (IntPtr display)
in <0x002f5> System.Windows.Forms.XplatUIX11:SetDisplay (IntPtr display_handle)
in <0x00098> System.Windows.Forms.XplatUIX11:.ctor ()
in <0x00043> System.Windows.Forms.XplatUIX11:GetInstance ()
in <0x00059> System.Windows.Forms.XplatUI:.cctor ()--- End of inner exception stack trace ---


in <0x00000> <unknown method>
in <0x0004b> System.Windows.Forms.Form:get_CreateParams ()
in <0x001fc> System.Windows.Forms.Control:.ctor ()
in <0x00011> System.Windows.Forms.ScrollableControl:.ctor ()
in <0x0000c> System.Windows.Forms.ContainerControl:.ctor ()
in <0x00010> System.Windows.Forms.Form:.ctor ()
in <0x0000a> mywin:.ctor ()
in (wrapper remoting-invoke-with-check) mywin:.ctor ()
in <0x0001a> mywin:Main ()

What I do wrong?

O.S.: Fedora Core 3
Mono: 1.1.5

Thanks in advance,
Xus

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Reply via email to