[Mono-osx] Windows Forms on the Mac

Michael Foord fuzzyman at voidspace.org.uk
Sat Jul 28 09:22:35 EDT 2007


Hello all,

I'm not sure if I should post to this list or the winforms list (so I'm 
starting here - feel free to redirect me).

Has anyone had any success getting Windows Forms to work with Mono on 
Mac OS X?

Instantiating a form dies horribly (see below). I have the Apple X11 
installed.

Some (old) Winforms bug reports suggested I might need to add references 
to the config file - but these are already in place in the current 
release of Mono.

IronPython 1.1a1 (1.1) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
 >>> import clr
 >>> clr.AddReference('System.Windows.Forms')
 >>> from System.Windows.Forms import *
 >>> f = Form()
Traceback (most recent call last):
 File System.Windows.Forms, line unknown, in .cctor
 File System.Windows.Forms, line unknown, in GetInstance
 File System.Windows.Forms, line unknown, in .ctor
 File System.Windows.Forms, line unknown, in SetDisplay
 File System.Windows.Forms, line unknown, in .ctor
 File System.Windows.Forms, line unknown, in .ctor
 File System.Windows.Forms, line unknown, in .ctor
 File System.Windows.Forms, line unknown, in .ctor
 File System.Windows.Forms, line unknown, in InternalSizeFromClientSize
 File System.Windows.Forms, line unknown, in get_CreateParams
SystemError: An exception was thrown by the type initializer for 
System.Windows.Forms.XplatUI
 >>>

All the best,

Michael Foord
http://www.ironpython.info


More information about the Mono-osx mailing list