[Mono-osx] winforms in mono 1.1.8.1 on OSX 10.4.1

David Hodge dh0 at mac.com
Fri Jun 24 11:21:11 EDT 2005


Marcus,


I had a similar issue a few days ago. I discovered something went  
funky with my fonts. I reinstalled x11 from the Optional Installs  
package in the Tiger install DVD and win-forms has been working fine  
since.

hope that helps,

good luck!

~David w. Hodge

On Jun 24, 2005, at 7:24 AM, MrcLrssn at netscape.net wrote:

> Hi!
>
> I'm trying to use winforms in mono 1.1.8.1 on OS X 10.4.1.
>
> The following class:
>
> using System;
> using System.Windows.Forms;
>
> public class MyForm : Form {
>
>         public MyForm() {
>               this.Text = "Hello Form";
>         }
>
>         public static void Main() {
>                 Application.Run(new MyForm());
>         }
> }
>
> compiled with:
>
> mcs /reference:System.dll /reference:System.Windows.Forms.dll  
> HelloForms.cs
>
> results in the following stack trace:
>
>
>> mono HelloForms.exe
>>
> Mono System.Windows.Forms Assembly [Revision: 44786; built:  
> 2005/5/25 22:34:45]
> Keyboard: Latin American keyboard layout
>
> Unhandled Exception: System.TypeInitializationException: An  
> exception was thrown by the type initializer for  
> System.Windows.Forms.ThemeEngine --->  
> System.NullReferenceException: Object reference not set to an  
> instance of an object
> in <0x00000> <unknown method>
> in (wrapper managed-to-native)  
> System.Drawing.GDIPlus:GdipGetGenericFontFamilySansSerif (intptr&)
> in <0x00034> System.Drawing.FontFamily:get_GenericSansSerif ()
> in <0x001fc> System.Windows.Forms.ThemeWin32Classic:.ctor ()
> in <0x00098> System.Windows.Forms.ThemeEngine:.cctor ()--- End of  
> inner exception stack trace ---
>
> in <0x00000> <unknown method>
> in <0x00014> System.Windows.Forms.Control:get_DefaultBackColor ()
> in <0x00010> System.Windows.Forms.Control:get_DefaultBackColor ()
> in <0x00088> System.Windows.Forms.Control:get_BackColor ()
> in <0x00024> System.Windows.Forms.Form:get_BackColor ()
> in <0x00190> System.Windows.Forms.Control:CreateHandle ()
> in <0x00014> System.Windows.Forms.Form:CreateHandle ()
> in <0x00040> System.Windows.Forms.Control:get_Handle ()
> in (wrapper remoting-invoke-with-check)  
> System.Windows.Forms.Control:get_Handle ()
> in <0x00050> System.Windows.Forms.Control:set_Text (System.String  
> value)
> in <0x00034> MyForm:.ctor ()
> in (wrapper remoting-invoke-with-check) MyForm:.ctor ()
> in <0x0002c> MyForm:Main ()
>
> Any ideas,
>
> Marcus
>
>
> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/ 
> register
>
> Netscape. Just the Net You Need.
>
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>



More information about the Mono-osx mailing list