Our control products can only be hosted by environments that support the distinction between design-time and run-time mode. Most environments such as Visual Basic, .NET, Visual C++, Delphi, etc. fully support this distinction. With some environments, notably Microsoft Excel and Access, you may get the "Demo Expired" message even if you followed all the suggested steps in this topic.
Distributing A Control
Unfortunately, a few platforms choose not to implement the required interfaces (mainly DISPID_AMBIENT_USERMODE), or implemented them incorrectly and when our control products are distributed, they believe that they are used in design-time mode without a license and display "Demo Expired".
While we would prefer for these environments to offer the DISPID_AMBIENT_USERMODE property, we have developed a workaround.
It will allow fairly smooth development, but it requires distribution of one additional file, which is not documented elsewhere. When distributing an OCX control file, an extra, empty file with the same name with ".runtime" appended must be installed into the same directory as the OCX control file.
Example:
When distributing the SftTree/OCX 7.5 control file "SftTree_IX86_U_75.ocx" (usually in the Windows\System32 directory or Windows\SysWOW64), the file "SftTree_IX86_U_75.ocx.runtime" must also be distributed (in the same directory). This file is an empty text file and its contents are ignored.
SftTree_IX86_U_75.ocx
SftTree_IX86_U_75.ocx.runtime
If you make copies of the OCX during installation (or on your development system), the associated .runtime file should also be copied.
Essentially, the .runtime file forces the control into run-time mode, even if the environment dictates design-time (or doesn't specify).
Development System
If you place a .runtime file in the same directory as the ocx file, the .runtime file is ignored on your development system.
On your development system, your licensed control will always run in design-time mode. The .runtime file is ignored (otherwise you would not be able to use the control in design-time mode at all).
In order to test your code in "run-time" mode, even on your development system, you have to explicitly call the SetRuntimeLicense method, as in:
VB Example: SftTree1.SetRuntimeLicense "Runtime", 0
You will have to call this for each control. Fortunately, most of our products don't make a real run-time/design-time distinction so calling SetRuntimeLicense is rarely needed (except for SftMask/OCX, which shows different control contents, based on run-time or design-time mode).
If you call SetRuntimeLicense in a "distributed" application (i.e., not on your development system), this does not cause any errors.
All our ActiveX products support the use of the .runtime file.