Re: [Gambas-user] Running program

2012-11-09 Thread Cogier
Thanks Fabien Bodard (good thought) & Johny Provoost. I tried Johny's solution and it did work, with modifications. I am using Gambas 2.23 and the following code did the trick. (The program is called "Barcode") Public Sub Form_Open() DIM sOutput AS String 'Check if the program not already s

Re: [Gambas-user] Running program

2012-11-07 Thread Fabien Bodard
You can use a .Lock file. if this file exist for example in ~/.cache/myapp dir then say to the user that the app is already running ... destroy this file when quitting the app if the app crash before so the file still exist.. just say to the user if he is sure to not have launched another time...

Re: [Gambas-user] Running program

2012-11-07 Thread Johny Provoost
Op 07-11-12 12:12, Cogier schreef: > Can you tell me the best way to spot that there is another instance of the > same Gambas program running at the same time. > > I have users who sometimes start the same program written in Gambas twice > and I would like the 2nd instance to pop up a message sayi

[Gambas-user] Running program

2012-11-07 Thread Cogier
Can you tell me the best way to spot that there is another instance of the same Gambas program running at the same time. I have users who sometimes start the same program written in Gambas twice and I would like the 2nd instance to pop up a message saying that there is already a copy of the progr