[Mono-winforms-list] MessageBox is working.. WinForms not
Juergen Moeller
juergen.moeller@elektrobude.de
Mon, 24 May 2004 10:27:43 +0200
Hello,
after a completely new installation of mono, I tried to build a very little
SWF-Application...
the code:
using System;
using System.Windows.Forms;
namespace MyFormTest
{
class SWFTest : System.Windows.Forms.Form
{
public static void Main(string[] args)
{
MessageBox.Show("msgbox...");
Application.Run(new SWFTest());
}
}
}
The MessageBox is shown! But after clicking the OK-Button of the
MessageBox, I get the following error:
Unhandled Exception: System.ArgumentException: Invalid Parameter. A null
reference or invalid value was found.
in <0x0007d> System.Drawing.GDIPlus:CheckStatus (System.Drawing.Status)
in <0x0004b> System.Drawing.Bitmap:.ctor
(int,int,System.Drawing.Imaging.PixelFormat)
in <0x00015> System.Drawing.Bitmap:.ctor (int,int)
in <0x00061> (wrapper remoting-invoke-with-check)
System.Drawing.Bitmap:.ctor (int,int)
in <0x00055> System.Drawing.Graphics:get_systemDpiX ()
in <0x00091> System.Drawing.Font:unitConversion
(System.Drawing.GraphicsUnit,System.Drawing.GraphicsUnit,single,single&)
in <0x00091> (wrapper remoting-invoke-with-check)
System.Drawing.Font:unitConversion
(System.Drawing.GraphicsUnit,System.Drawing.GraphicsUnit,single,single&)
in <0x00098> System.Drawing.Font:setProperties
(System.Drawing.FontFamily,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool)
in <0x000c4> (wrapper remoting-invoke-with-check)
System.Drawing.Font:setProperties
(System.Drawing.FontFamily,single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit,byte,bool)
in <0x0006f> System.Drawing.Font:.ctor
(intptr,string,System.Drawing.FontStyle,single)
in <0x00099> (wrapper remoting-invoke-with-check) System.Drawing.Font:.ctor
(intptr,string,System.Drawing.FontStyle,single)
in <0x001ea> System.Drawing.Font:FromHfont (intptr)
in <0x00018> System.Windows.Forms.Control:get_DefaultFont ()
in <0x001c1> System.Windows.Forms.Control:.ctor ()
in <0x0000e> System.Windows.Forms.ScrollableControl:.ctor ()
in <0x0000a> System.Windows.Forms.ContainerControl:.ctor ()
in <0x00016> System.Windows.Forms.Form:.ctor ()
in <0x0000a> MyFormTest.SWFTest:.ctor ()
in <0x0004f> (wrapper remoting-invoke-with-check) MyFormTest.SWFTest:.ctor
()
in <0x0002a> MyFormTest.SWFTest:Main (string[])
So, there seems to be an error in System.Drawing???
I compiled the little test like that:
mcs -r System.Windows.Forms SWFTest.cs
mcs -r System.Windows.Forms -r System.Drawing SWFTest.cs
Both methods produce the same result. In the first method, is
System.Drawing included automatically by System.Windows.Forms? Because the
exception happens everytime in System.Drawing.
I have installed following form CVS:
mono 0.91.99
winelib
libgdiplus 0.6
and Wine-20040505 from a tarball
on a SuSE 9.0
Where should I search for the error?
Thanks,
Juergen