[Mono-list] problem with simple one window application based on GTK#

Francisco T. Martinez martinf@mfconsulting.com
Sun, 05 Dec 2004 05:32:05 -0600


Ivan Turcan wrote:

> Hi friends,
>  
> I have installed gtk# for visual studio.net and tried to build simple 
> one window application (nothing special, only one form) when i build 
> in Visual Studio.Net this application it work correctly.
> I tried to execute same application under mono , used  command "mono 
> myapplication.exe"   all on windows XP... and this application execute 
> show me form and then close without to stay to be openned. In command 
> prompt i have following error:
>  
>  
> I have installed mono-1.1.2-gtksharp-1.9-win32-0.3.exe which i have 
> used for test in this project
> and gtksharp-1.0.2-win32-0.6.exe which is used within Visual Studio 
> 2003.Net
>  
> could somebody help me how can  i run my application correctly?
>
Mono 1.1.2 for Win32 is a preview release that uses Gtk# 1.9 (pre 2.0), 
Gtk# 1.0.4 and ships with GTK+ 2.4.  Glade 2.0.1, the one in bundled 
with the Gtk# Win32 Installer for the .NET Framework SDK 1.1 (available 
from Novell Forge) ships with GTK+ 2.2.4.  GTK 2.2.4 and GTK 2.4 are 
significantly different specially when it comes to Glade applications. 

If you want the most portable applications using Gtk#, refrain from 
using Glade# and/or install Mono 1.0.2 (or Mono 1.0.4) for Win32.  These 
versions of Mono can be installed side-by-side with the Mono 1.1.2 
"Preview" technologies.

Although in a very early and experimental phase, you could use the 
Runtime Selector I have been working on to cleanly switch between Mono 
1.0.x and Mono 1.1.x in Win32. When coupled with the monolaunchC.exe 
(with console) or  monolaunchW.exe (without console window) that are 
included in that installer, you could drag-and-drop executables on the 
desktop short-cuts it creates or invoke your applications from any 
console shell session created by running cmd.exe and using this syntax:

(If you want to see console output)
C:\>monolaunchc.exe d:\MyAppDir\MyApp.exe
or
(If you don't want to see console output)
C:\>monolaunchw.exe d:\MyAppDir\MyApp.exe

You can download that system from here:

http://forge.novell.com/modules/xfcontent/private.php/monowin32/Runtime%20selector/MonoLaunch-1.0.0.0.exe

Paco.