View previous topic :: View next topic |
Author |
Message |
Blaine Fields Guest
|
Posted: Tue Feb 07, 2006 10:32 pm Post subject: How does the Evaluation Monitor check the usage in PDAs? |
|
|
the program I've written for the PDA resides in memory and when exiting or restarting the program, the only thing happening is that the program is merely redisplayed. The program doesn't go through a shutdown and startup process each time. So, how is the monitor going to keep track of usage? During the debugging process, the install license screen comes up initially as the program is first started, but thereafter the install screen never comes up again.
Am I missing something?
Blaine Fields |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Feb 08, 2006 12:58 am Post subject: |
|
|
The UsageCount for the EvaluationMonitor is incremented each time an instance of the EvaluationMonitor class (with the same productID) is created. If your PDA application is intended to stay memory resident then I would suggest checking the DaysInUse flag instead and doing this in some function that you know will be called regularly (eg a button click). _________________ Infralution Support |
|
Back to top |
|
|
Blaine Fields Guest
|
Posted: Wed Feb 08, 2006 3:38 am Post subject: |
|
|
Well, I didn't intend it to reside in memory. I just wrote it and when it loads, that's what happens.
I think a better approach would be to raise an event with the change of the day and use that to trigger a usage check. But, that still leaves the issue as to what to do when the time expires. Somehow I'm going to have to shut the program down to a state that it will have to reload and I don't have the slightest idea how to do that.
Blaine Fields |
|
Back to top |
|
|
Blaine Fields Guest
|
Posted: Thu Feb 09, 2006 11:07 pm Post subject: |
|
|
Found the solution. There is a property called "MinimizeBox" for forms and if this property is set to "true" in the main form, upon close the program will not terminate, but will become minimized. It's quicker to activate this way.
By setting the property to "false", upon close the program actually closes and the evaluation code will function normally when the program is reactivated. Because minimizing the program allows for quicker reactivation, upon the program becoming licensed, I simply change the property back to true programmatically.
Blaine Fields |
|
Back to top |
|
|
|