Tests whether this is the first instance of the application (whether the application is already running).
Namespace:
SGP.XUtilityAssembly: SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718
Syntax
C# |
---|
public static bool AllowOnlyOneInstance() |
Return Value
trueTruetruetrue (True in Visual Basic) whether this is the first instance (execution).
Remarks
Method tests existence of a different application instance in the system. If the application is already running, switchs focus to that instance and delivers command line parameters through Windows message
(ProcessCommandLineMessage(Message%, String%)),
and then returns falseFalsefalsefalse (False in Visual Basic).
If the application is not already running in the system, returns trueTruetruetrue (True in Visual Basic).
The application should react to the return value falseFalsefalsefalse (False in Visual Basic) by termination itself (another instance is running).