[Mono-winforms-list] System.Windows.Forms test

Peter Dennis Bartok peter at novonyx.com
Tue Jul 26 19:07:02 EDT 2005


Please read what the exception tells you. You are lacking a gdiplus that 
supports the requested image format.

If you built from source, configure tells you at the end which image 
libraries it found, and where to get them (if not found).

Peter


-----Original Message-----
From: "Santi Serrano" <santi.serrano at bigfoot.com>
To: "Mono WinForms" <mono-winforms-list at lists.ximian.com>
Date: 26 July, 2005 16:59
Subject: [Mono-winforms-list] System.Windows.Forms test


>Hi,
>
>I am trying to compile and execute a simple program that only shows a form
>but I get the folowing error when executing:
>
>-------------------------------------------------------
>Unhandled Exception: System.TypeInitializationException: An exception was
>thrown  by the type initializer for System.Windows.Forms.XplatUI --->
>System.Reflection .TargetInvocationException: Exception has been thrown by
>the target of an invoca tion. ---> System.NotSupportedException: Either
>image format is unknown or you d on't have the required libraries for this
>format.
>in <0x0014a> System.Drawing.GDIPlus:CheckStatus (Status status)
>in <0x000ca> System.Drawing.Image:InitFromStream (System.IO.Stream stream)
>in (wrapper remoting-invoke-with-check) System.Drawing.Image:InitFromStream
>(Sys tem.IO.Stream)
>in <0x00104> System.Drawing.Bitmap:.ctor
>(System.Runtime.Serialization.Serializa tionInfo info, StreamingContext
>context)
>in <0x00000> <unknown method>
>in (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke
>(obj ect,object[])
>[...]
>-------------------------------------------------------
>
>The source code:
>
>-------------------------------------------------------
>using System;
>using System.Windows.Forms;
>
>public class Form1 : Form
>{
>  public static void Main()
>  {
>    Application.Run(new Form1());
>  }
>}
>-------------------------------------------------------
>
>I am using the ubuntu live mono cd with the following commands:
>
>mcs Form1.cs -r:System.Windows.Forms          -> OK
>mono Form1.exe                                -> KO
>
>Thank you for you help.
>Santi.
>
>_______________________________________________
>Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
> 



More information about the Mono-winforms-list mailing list