|
Method ActivateSecurity Integer ActivateSecurity ( )
The single most important method within the AppLic Security control. The control will function successfully by using all default values, however this method MUST be called at some point (usually when loading the initial form or dialog). If using DefaultDialogs=True and if the software is unlicensed, the default unlock dialog will be displayed. We recommend checking the return value. If the return value is 0, the unlock dialogs have been skipped (cancel has been pressed). If the return value is 2 we recommend limiting use of your application and offering the user the opportunity to unlock using ForceActivation.
Usage: <SecurityObject>.ActivateSecurity()
Return Value: 0 if unlicensed, 1 if licensed and 2 if in demo mode.
Sample (VBA) code:
Dim iReturnVal As Integer iReturnVal = SecurityCtrl.ActivateSecurity if iReturnVal = 0 Then DoCmd.Quit Else If iReturnVal = 2 Then g_bIsDemoMode=True 'A global value used to limit functionality Else 'Continue, the application is licensed End If
Note: This method should be called every time the software is run as once a license has been activated via the internet, this method will check on any changes to the license each time it's called with an internet connection.
|