[fpc-pascal] File Association and opening with already running app

Zaher Dirkey parmaja at gmail.com
Fri Apr 5 11:43:53 CEST 2013

Please tell us you success story when you done

For me i am using SimpleIPC

look at AnotherInstance and MainUnit.pas

Works good in Windows but not tested in Linux.

On Thu, Apr 4, 2013 at 12:08 PM, Graeme Geldenhuys
<graeme at geldenhuys.co.uk>wrote:

> Hi,
> I'm posting it here, but it is not a Lazarus question, but a general GUI
> app (created with FPC) question.
> Example of what I want to achieve. Say I have gEdit (Gnome editor) open
> and have a file loaded. Now if I am in a console and type 'gedit
> someotherfile.txt' [or double click a text file in Nautilus], it doesn't
> start a new instance of gedit, the existing instance opens the new file
> - gedit supports multiple opened files in a tabbed view.
> How do they accomplish this? I would like to implement something like
> that for fpGUI, and it must work under all fpGUI supported "desktop"
> platforms.
> I know under Windows you can check if an instance of an application is
> already running, and stop your current instance. Still not sure how to
> transfer the "open a new file" action to that existing instance.
> As for Linux, FreeBSD etc, I have no clue how to do it. For those not in
> the know, fpGUI is based directly on GDI or XLib (not Qt, GTK etc).
> Regards,
>   - Graeme -
> --
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> http://fpgui.sourceforge.net/
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130405/931d8ed9/attachment.html>

More information about the fpc-pascal mailing list