Limit and Exit The Use of Your Program After N Times

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Beginning
Author:
Patrick Lockefeer

Version Compatibility: Visual Basic 6

More information:
This sub procedure examples a very easy way to limit the use of your progam by using a static variable for a counter to exit your program. Simply add a command button control, and this example shows the total clicks as the caption.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: