[MonoDevelop] WIndows forms Solution
christoph.g-punkt at web.de
Sat Apr 8 06:50:01 EDT 2006
Aha, yes thats very interestening. I didn't work with dialogs yet in Gtk.
But how can it be combined with glade?
My solution when using windows and glade looks like this:
public class Window1: IDisposable
public delegate void WCallbackHandler(int args);
public event WCallbackHandler OnStatusChanged;
Glade.XML gxml = new Glade.XML (null, "window1.glade", null, null);
This adds the created window object to the runnng app but connects
handler-methods of the window to class-internal methods. To see when the
window is done (or closed) I publish an event that must be subscribed to from
the main window.
> Christoph G. wrote:
> >-the drawback of WindowsForms under X for me is the speed
> That's also my experience!
> I haven't tried GTK# under Windows yet,
> > but I could imagine that it works fine there,too,
> I am developing a small GTK# application in Monodevelop. It is primarily
> targeted at Linux, but I want it to run on Windows, too. Last week I
> tried to move my assemblies to a Windows machine running .NET 1.1. It
> worked right away, without any recompiling, only it always started a
> Windows command window that I couldn't get rid of. To avoid this problem
> I tried to recompile the main assembly (the EXE, containg all the GUI
> stuff) on Windows using SharpDevelop. That solved the problem, and in
> addition the graphic appearance of the program got even better. On XP,
> my program now looks just like any other XP program (except for the GTK
> icon in the top-left corner of each window - don't know how to get rid
> of it).
> So my conclusion is clear: If you want your program to look and perform
> great on both Linux and Windows, don't use Windows Forms. Go for GTK#!
> > -A bit dissapointing for me on GTK# is the way one could do real OOP with
> > it, because of the Application.Run() thing - wich starts one
> > Main-Window-Handler for your whole application, so therefore I had
> > difficulties to create real seperate classes for every window I have ,
> > and also to seperate the code into different files, as I was used to in
> > Windows. Maybe one of the experienced GTK-programmers here can say
> > something to this point, cause I'm really wondering how large application
> > can be made this way..
> I won't say I'm very experienced, but I certainly do real OOP! And I
> certainly create different classes for every window! You might take a
> look at my code (probably I'll put a new version up later today):
> Best regards,
> Finn G. Larsen
More information about the Monodevelop-list