Disable program after 100 times used

By | 2002-06-01

This code will disable your program after a certain number of runs of the program. more info: worm@thepentagon.com

Original Author: Worm

Assumptions

Put in Form_Load statement. And this code is for 32-bit programming Only!

Side Effects

Don’t put this code in while your testing and programming your program because it will then disable you from running your program. more info: worm@thepentagon.com

API Declarations

Code

'put in form_load
retvalue = GetSetting("A", "0", "Runcount")
Worm$ = Val(retvalue) + 1
SaveSetting "A", "0", "RunCount", Worm$
If Worm$ > 99 Then 'put one number lower then it says....you can only run the program 200 times.
MsgBox "This is the end of the trial run",16,"Sorry"
Unload me
End If

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.