[Gtk-sharp-list] Single Instance Application in GTK#

Felipe Almeida Lessa felipe.lessa at gmail.com
Tue Nov 15 14:57:26 EST 2005


2005/11/2, Ivan <ivan.teoh at gmail.com>:
> Hi,

Hello.

> Is there a way to develop single instance application in GTK#?
> I know there is
> SingleInstance.SingleApplication.Run(new FrmMain());
> for windows forms.
> I am more interested on an application that using GTK# and loading GUI
> run time using GLADE# and without GNOME# and without Windows Forms. So
> that the application can run under windows and linux too.

This feature is *not* from System.Windows.Forms. This "SingleInstace"
namespace comes from the file attached on the CodeProject link you
sent.

Talking about links, the other two (from mail.gnome.org) does not have
anything to do with a single instance of an application.

You can, yes, implement this using GTK#, or any other toolkit, or no
toolkits at all. You just need to implement some sort of interprocess
comunication. The simplest one .NET, AFAIK, is using a named
System.Threading.Mutex, like the files from the CodeProject article
do.

> Ivan.

Cya,
Felipe.

--
"Quem excele em empregar a força militar subjulga os exércitos dos outros
povos sem travar batalha, toma cidades fortificadas dos outros povos sem as
atacar e destrói os estados dos outros povos sem lutas prolongadas. Deve
lutar sob o Céu com o propósito primordial da 'preservação'. Desse modo suas
armas não se embotarão, e os ganhos poderão ser preservados. Essa é a
estratégia para planejar ofensivas."

  -- Sun Tzu, em "A arte da guerra"


More information about the Gtk-sharp-list mailing list