MirraKey Properties

Property ActivationCode as String
Property ActivationLicenseKey as string
Property ActivationUserID as string
Property BannerPicture as string
Property CompanyNameFolder As String
Property EncryptionKey As String
Property EncryptLicense As Boolean
Property LicenseAllUsers As Boolean
Property LicenseKey As String
Property LicenseValid As Boolean
Property Options As Long
Property ProductName As String
Property ProductNameFolder As String
Property PurchaseURL As String
Property SerialNo As String
Property ShowTrialDialog As Boolean
Property UserName As String

MirraKey is a COM ActiveX library and needs to be added to your project as a Reference and declared to call its methods or set properties.

Visual Basic 6 declaration
Dim objMirraKey as MirraKey
Set objMirraKey = New MirraKey

VB.Net declaration
Dim objMirraKey as New MirraKeyLib.MirraKey

 

ActivationCode property
Description Sets or returns the ActivationCode property.  This property is set before you call the AddActivationCode method.  The ActivationCode is an additional software authentication feature that is stored in the Mirrakey XML file if you use the License Key Manager feature of Mirrakey.  You can use the ActivationCode to store your own activation identity but it is designed to be a code generated by Mirrakey using your software's license key and a property that identifies the licensed computer.  Using this concept you can authenticate a valid license/computer locally when your application starts or invokes some features.
Syntax ActivationCode() As String
Default Value Empty string
Example objMirraKey.ActivationCode = "12345 12345 12345 12345"

 

ActivationLicenseKey property
Description Sets or returns the ActivationLicenseKey property.  This property, together with the ActivationUserID property, is used to generate the ActivationCode that can be used by Mirrakey to Activate your software or validate Activation for a specific PC.
Syntax ActivationLicenseKey() As String
Default Value Empty string
Example Dim strLicenseKey as String
Dim objMirrakey As New MirraKeyLib.MirraKey
objMirrakey.CompanyNameFolder = "MyCompanyName"
objMirrakey.ProductNameFolder = "MyAppName"
Dim strLicenseKey as String = GetValueFromLicenseFile("LicenseKey")
objMirraKey.ActivationLicenseKey = strLicenseKey
objMirraKey.ActivationUserID = "Unique User or PC ID"
objMirraKey.ActivationCode = objMirraKey.GenerateKey()
objMirraKey.AddActivationCode ' This adds the activation code to your software's license file.  The activation code can then be authenticated when your software starts or invokes a feature.
objMirraKey = Nothing

 

ActivationUserID property
Description Sets or returns the ActivationUserID property.  This property, together with the ActivationLicenseKey property, is used to generate the ActivationCode that can be used by Mirrakey to Activate your software or validate Activation for a specific PC.
Syntax ActivationUserID() As String
Default Value Empty string
Example Dim strLicenseKey as String
Dim objMirrakey As New MirraKeyLib.MirraKey
objMirrakey.CompanyNameFolder = "MyCompanyName"
objMirrakey.ProductNameFolder = "MyAppName"
Dim strLicenseKey as String = GetValueFromLicenseFile("LicenseKey")
objMirraKey.ActivationLicenseKey = strLicenseKey
objMirraKey.ActivationUserID = "Unique User or PC ID"
objMirraKey.ActivationCode = objMirraKey.GenerateKey()
objMirraKey.AddActivationCode ' This adds the activation code to your software's license file.  The activation code can then be authenticated when your software starts or invokes a feature.
objMirraKey = Nothing

 

BannerPicture property
Description Sets or returns the BannerPicture property that is used by the License Key Manager feature of Mirrakey.  This property is the path to a picture file that is used by the LIcense Key Manager form to display your company logo. If not set or the file is not found, the default picture is used.  The picture size should be 400 x 70 px or smaller.
Syntax BannerPicture() As String
Default Value Empty string
Example objMirraKey.BannerPicture = "C:\My Pictures\MyLogo.gif"

 

CompanyNameFolder property
Description Sets or returns the CompanyNameFolder property that is used by the License Key Manager feature of Mirrakey.  This property is used together with the 'ProductNameFolder' property to set the path used by the LIcense Key Manager when saving your software's license information.
Syntax CompanyNameFolder() As String
Default Value Empty string
Example objMirraKey.CompanyNameFolder = "XYZ Software"

 

EncryptionKey property
Description Sets or returns the key used to encrypt your software's License Key information if you use Mirrakey's License Key Manager.  It is also the property used by the Encryption tools provided with Mirrakey.
Syntax EncryptionKey() As String
Default Value Empty string
Example objMirraKey.EncryptionKey = "MySecretKey"

 

EncryptLicense property
Description Sets or returns a boolean value that determines whether the License key and other values are encrypted when using the Mirrakey License Key Manager.
Syntax EncryptLicense() As Boolean
Default Value False
Example objMirraKey.EncryptionKey = "MySecretKey"
objMirraKey.EncryptLicense = True
(You must set the 'EncryptionKey' property if you set the 'EncryptLicense' property to True.)

 

LicenseAllUsers property
Description Sets or returns a boolean value that determines whether the License Key Manager will save your software's license information for all Windows' user accounts or only the current user.
Syntax LicenseAllUsers() as Boolean
Default Value False
Example objMirraKey.LicenseAllUsers = True

 

LicenseKey property
Description Returns the LicenseKey string generated by the GenerateKey() method or sets the LicenseKey property used by the ValidateKey() method together with the other relevant properties for 'ProductName', 'SerialNo' or 'UserName'.
Syntax LicenseKey() As String
Default Value Empty string
Example Dim strLicenseKey as String
objMirraKey.LicenseKey = objMirraKey.GenerateKey()
or
strLicenseKey = objMirraKey.GenerateKey()
-------------------------------------------------------
Dim strLicenseKey as String, strSerialNo as String, IsValid as Boolean
objMirraKey.LicenseKeyLicenseKey = "ABCDE-01234-FGHIJ-56789-KLMNP-QRSTU"
objMirraKey.LicenseKeySerialNo = "1234 5678"
IsValid = ValidateKey()

 

LicenseValid property
Description Read-only property that returns a boolean value when the ValidateKey() method is called.  This property is the same as the value returned by the ValidateKey() method.
Syntax LicenseValid() as Boolean
Default Value Read only property set by the ValidateKey() method.
Example Dim strLicenseKey as String, strSerialNo as String, IsValid as Boolean
objMirraKey.LicenseKeyLicenseKey = "ABCDE-01234-FGHIJ-56789-KLMNP-QRSTU"
objMirraKey.LicenseKeySerialNo = "1234 5678"
objMirraKey.ValidateKey()
IsValid = objMirrakey.LicenseValid


Options property
Description Sets a long integer value that is used to determine your software's features or options (if any).  This property can be used to turn-on or turn-off features in your software based on your client's purchase.
Syntax Options() as Long
Default Value 0
Example Dim nValue as long
objMirrakey.Options = nValue


ProductName property
Description Sets the ProductName property (if any) that is used by the GenerateKey() or ValidateKey() methods.  Both methods require one or more of the 'ProductName', 'SerialNo' or 'UserName' properties to be set.
Syntax ProductName() as string
Default Value Empty string
Example objMirrakey.ProductName = "MySoftwareApp"
objMirrakey.GenerateKey()


ProductNameFolder property
Description Sets or returns the ProductNameFolder property that is used by the License Key Manager feature of Mirrakey.  This property is used together with the 'CompanyNameFolder' property to set the path used by the LIcense Key Manager when saving your software's license information.
Syntax ProductNameFolder() As String
Default Value Empty string
Example objMirraKey.ProductNameFolder = "MySoftwareApp"


PurchaseURL property
Description Sets or returns the PurchaseURL property that is used by 'Purchase Now' button on the License Key Manager form.  Set this property to the Order page address of your website if you are using the License Key Manager feature of Mirrakey.
Syntax PurchseURL() as string
Default Value Empty string
Example objMirrakey.PurchaseURL = "http://www.mywebsite.com/order.htm"


SerialNo property
Description Sets the SerialNo property (if any) that is used by the GenerateKey() or ValidateKey() methods.  Both methods require one or more of the 'ProductName', 'SerialNo' or 'UserName' properties to be set.
Syntax SerialNo() as string
Default Value Empty string
Example objMirrakey.SerialNo = "12345 67890"
objMirrakey.GenerateKey()


ShowTrialDialog property
Description Sets or returns the ShowTrialDialog boolean value that determines whether the License Key Manager form is displayed when you call the ValildateKey() method.  If set to True, this feature can be used to display a nag window to prompt your client to purchase your software.  If set to True and your software is already licensed, the License Key Manager form is NOT displayed.
Syntax ShowTrialDialog() As Boolean
Default Value False
Example objMirraKey.ShowTrialDialog = True
objMirraKey.ValidateKey()


UserName property
Description Sets the UserName property (if any) that is used by the GenerateKey() or ValidateKey() methods.  Both methods require one or more of the 'ProductName', 'SerialNo' or 'UserName' properties to be set.
Syntax UserName() as string
Default Value Empty string
Example objMirrakey.UserName = "MyUserName"
objMirrakey.GenerateKey()