Add RunOnce to your application in a few Easy Steps!
(For Multi-DLL apps - do this in the mainexe
application).
1) Import the RunOnce_HandleSecondInstance window using the
template utility. Open your application in the Clarion IDE,
and select (from the Application menu) the Template Utility,
and then select one of the following utilities (there's one
for ABC and one for legacy):

2) Add the global extension (Global -> Extensions -> Insert
-> Activate CapeSoft RunOnce).
3) On the Options tab of the Global Extension template, enter
the port number (use a random number between 2000 and 32000.
4) Add the RunOnce - Server window Template
extension template to your frame
window (or another window that stays open continuously. (Procedure
properties -> Extensions -> insert and select the
RunOnceServer template)
5) Add NetTalk to this application (in the normal manner as
prescribed in the NetTalk docs) if you have not yet added it. (Note:
for multi-dll applications, you'll need to add the NetTalk
extension to your data dll application as well - if you have not
done so already).
For additional options, take a look at the
RunOnce templates section of
this document.
Problems in implementing RunOnce:
- If you are getting other instances of
your application opening, make sure that you have completed
all of the above steps (particularly the
addition of the RunOnceServer local extension template).
- If you have a legacy application that GPFs on startup, see the NetTalk FAQs on
how to add the dllmode and linkmode equates. This fix will be included in
NetTalk 4.32.
|