[Mono-winforms-list] Problem with windows forms

Jurek Bartuszek koxta@koxta.net
Sun, 26 Dec 2004 13:40:27 +0100


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi! I've installed mono-1.1.3 with Managed.Windows.Forms. I try to run
such a simple program:

koxta@hell 3 $ cat file.cs
using System;
using System.Windows.Forms;

public class HelloWindowsForms
{
~        public static void Main()
~        {
~        MessageBox.Show("Hello C# World");
~        }
}

koxta@hell 3 $ mcs file.cs -r System.Windows.Forms
Compilation succeeded

koxta@hell 3 $ mono file.exe
#region #line XplatUI Constructor called

Unhandled Exception: System.InvalidOperationException: Already visible
forms cannot be displayed as a modal dialog. Set the Visible property to
'false' prior to calling Form.ShowDialog.
in <0x0008d> System.Windows.Forms.Form:ShowDialog
(System.Windows.Forms.IWin32Window)
in <0x0005b> (wrapper remoting-invoke-with-check)
System.Windows.Forms.Form:ShowDialog (System.Windows.Forms.IWin32Window)
in <0x00012> System.Windows.Forms.Form:ShowDialog ()
in <0x00045> (wrapper remoting-invoke-with-check)
System.Windows.Forms.Form:ShowDialog ()
in <0x00038> MessageBoxForm:RunDialog ()
in <0x00045> (wrapper remoting-invoke-with-check)
MessageBoxForm:RunDialog ()
in <0x0003c> System.Windows.Forms.MessageBox:Show (string)
in <0x0000f> HelloWindowsForms:Main ()

When i run mono file.exe, something shows up on my screen, but
disappears after a few miliseconds (actually, it blinks). Does anyone
know how to fix this?

Regards,

Jurek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBzrE76l8uJkeTVlMRAhJsAKChEdZtCMYf+O0ZrBr1F/PzLjMkSACfUW8q
feIqL6Iwl8F6JgaOUAhLbSY=
=yx21
-----END PGP SIGNATURE-----