[Gtk-sharp-list] Gtk-Window only declared in a DLL and start with console
Thomas Zühlke
muell_muell_@gmx.net
Thu, 20 Jan 2005 19:45:49 +0100
Hi,
i try to write a console program, that can later start a gtk window. the
console should not use any other dlls than the one that declares the window.
The gtk_window.dll file contains only:
using System;
using Gtk;
using Gdk;
namespace gtk_window{
public class mywindow{
public Gtk.Window win;
public fenster(){
win = new Gtk.Window("gtk_test4");
win.SetDefaultSize(800, 600);
win.DeleteEvent += OnWinDelete;
win.ShowAll();
}
void OnWinDelete(object o, DeleteEventArgs args) {
Application.Quit();
}
}
}
and in the main program i try:
using gtk_window;
...
private mywindow mw;
mw = new mywindow();
...
but durin running this program, it terminates with an error at the
second line.
i can solve the problem when i tell the main program (the console
program) that it should use gtk-sharp.dll... and i'm writing:
Application.Init();
mw = new mywindow();
Application.Run();
but i think it must be possible to generate a window, only out of the
dll, because i will try to use Windows.Form or wxNET later, only by
replacing the gtk_window.dll.
hope for solutions ;-)
Thomas Zühlke