Using 3rd Party ActiveX Controls in Runtime Applications


Users of Runtime applications that use 3rd party ActiveX controls do not own a licensed copy of the ActiveX control. as a result, even though the particular ActiveX control is physically present on the user's machine and is properly registered, when a user tries to run the application, he gets an error saying that the control is not licensed.

If the ActiveX control has been placed on a Form, the form must be edited using Alpha Five Version 7 build 3996-3019 or above and then resaved. You must make some small change to the form to make it "dirty" or else Alpha Five will not resave it. This will save the form with an embedded copy of the developer license key and the form will then run correctly in a Runtime application. The Runtime application must be run using build 3996-3019 or later. If the ActiveX control is loaded in an Xbasic script (for example, it may have been placed on an Xdialog), you must edit the script and add the following Xbasic command:

ole.AddLicense(ProgramId, LicenseNumber)

See OLE.AddLicence() for more information. The Xbasic Code Editor provides a genie to help you generate this command. To access this genie open the editor and select Code > More Genies > Insert ActiveX Control License Command. This release adds the following Xbasic commands:

  • Ole.AddLicense() 

    Adds a Program Id (ProgId) and associated license key to Alpha Five's global license cache.

  • Ole.RemoveLicense() 

    Removes a license key from Alpha Five's global cache.

  • Ole.GetLicense() 

    Returns the license key associated with a ProgId. If none found, causes an error.

  • Ole.LoadDeveloperLicense() 

    Returns the license key for a ProgId on a developer's machine. (This function is never used at run time.)

See Also