[TRMW]
run_once=0
Normally specified in individual program sections only.
From 4.620 it is possible to arrange that only one instance of particular DP4 executables should be allowed to run at a time. This facility is most likely to be useful on Pocket PC 2002, where clicking on the "close" button of an application does not actually close it but only minimises it. Restoring an application is not easy for the user on Pocket PC, and many applications automatically restore a previous instance and exit when the user tries to run a second instance. DP4 tests for a previous instance of the application by making the main window class for an application the full pathname of the application. When an application starts the DP4 terminal manager looks for an existing window of the same class. This setting is available on all Win32 platforms, not just Windows CE.
The run_once setting has three possible values:
run_once=0
This allows multiple instances to run without warning the user.
run_once=1
A second instance tries to set the first instance into the foreground and then exits. Making another application the foreground application is not always possible on all versions of Windows. In case of difficulty use the "fixsf" application available from the Itim DP4 web site.
run_once=2
A second instance brings up a message box dialog asking the user if he wants to start a new instance. If the user answers No, the first instance is set to the foreground in the same way as for run_once=1
, otherwise the second instance runs normally. The title and text of the dialog can be customised using
run_once_question and run_once_title