Allow only one instance of a program

Started by Petrus Vorster, February 18, 2015, 12:50:41 PM

Previous topic - Next topic

Petrus Vorster

Just a recap please.
How do you allow only one instance of your program to run?
-Regards
Peter

Jean-pierre Leroy

Hi Petrus,

Just put this code in the FF_WINMAIN special function:


If FF_PrevInstance Then       
        Function = %True    'return %TRUE if you want the program to end.
        Exit Function
End If


You can add a message to inform the end user as well.

Regards,
Jean-Pierre

Petrus Vorster

-Regards
Peter