1 System.Windows.Forms README
3 by John Sohn (jsohn@columbus.rr.com) and Miguel de Icaza (miguel@ximian.com)
6 Dennis Hayes (DENNISH@Raytek.com)
7 Backup: Miguel de Icaza (miguel@ximian.com)
11 http://lists.ximian.com/mailman/listinfo/mono-winforms-list
15 mono-winforms-list@ximian.com.
20 Welcome to the System.Windows.Forms implementation for Mono.
22 This is still an early version of the class library. The
23 plans for this library have changed, the plans to use multiple
24 backends is no longer being pursued.
26 We are now implementing this using the Wine library (because
27 Windows.Forms applications require the message handling to be
28 compatible with Windows, look up the Control.Wndproc method
31 Currently it is possible to use the Visual Studio solution in
32 this directory to build the class libraries, and test the
33 sample programs against our implementation.
35 To run and execute with the Mono runtime on linux, the story
36 is more complicated as we need to use the "WineLib" support in
41 The layout in this directory has some historical files that you can
42 safely ignore, the following are just historical directories:
47 All of the real code is being done in the same was as it is being done
48 in the rest of the Mono assemblies.
50 * Building System.Windows.Forms for Unix using Wine.
52 Since a WineLib application is a Windows application that is compiled under
53 Unix/Linux as a shared library it needs to be started differently than other
54 applications. The WineLib application is started as any other Windows
55 application running under Wine using the wine command. You cannot simply link
56 in libwine (gcc myapp.c -lwine) to use Win32 functions.
58 In order to use WineLib/Win32 functions under Mono I have created a small
59 "stub" application that embeds the Mono engine inside the WineLib application.
60 This is basically a replacement for the "mono" command that can be used
61 to call the Win32 API (using WineLib) within an application written for Mono.
63 To get started I suggest installing Wine and Mono first if they are not
64 already installed. I am usually using the latest Wine snapshots built from
65 source and installed under /usr/local. Also be sure to build/use a version of
66 Mono with garbage collection disabled as there is a problem using WineLib with
67 garbage collection enabled (check the mono-list archives for this discussion).
68 You can disable garbage collection when building mono by adding --with-gc=none
69 to the configure command. In the mono directory I build mono as:
70 ./configure --with-gc=none
72 In the WINELib makefile you may have set these to the appropriate files and/or
75 X11R6_INCLUDE=/usr/X11R6/include
76 WINE_INCLUDE=/usr/local/include/wine
77 WINE_LIB=/usr/local/lib/wine
78 LIBMONO=/usr/local/lib/libmono.a
80 If you type make from the mcs/class/System.Windows.Forms/WINELib
81 directory it should build:
83 System.Windows.Forms.dll -
84 The current (if largely incomplete) Windows Forms package.
86 FormTest.exe, NativeWindowTest.exe, Test.exe -
87 Test applications which link to and tests the System.Windows.Forms.dll
90 The WineLib application that starts the Mono/WineLib application. This
91 small WineLib application embeds the Mono JIT engine allowing any Mono
92 application running in it access to WineLib/Win32 function calls.
94 Before starting any of the applications set the LD_LIBRARY_PATH to the
95 current directory (so DllImport can find the monostub.exe.so library):
96 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
98 To start any of the applications you type (from the WINELib directory):
99 wine monostub.exe.so mono-winelibapp.exe