appstartcounter TacAppStartCounter component
Hierarchy Properties Methods Events Example
Return to Introduction  Previous page  Next page
The acAppStartCounter component can be used used to count up the number of program startups and log the time when the program was started first time to the registry. This can be useful if you would like to execute some actions on a any certain number of startups, to determinate when the application was first executed on certain PC, or determinate how long time the program are installed on current PC.  
If you would like to show welcome message on first start, or reminder message on every twentieth restart or any other operation regarding the count of program startups — this component is that you need! Also it useful for you if you want to measure the lifespan of the application and record it to some remote database when the application uninstalls.  

How does it work?
On every program start, acAppStartCounter will increase the Counter variable which is hidden in the System Registry. The location of this key in the registry can be defined by RegKey and RegLocation properties. See example of usage.  
tip To reset the counter at design-time - double click on the component image or click right mouse button and select "Reset Counter" menu item. To reset counter at run-time - use ResetCounter method.