OCX Controls & software technologies

Frequently Asked Questions


Index:

  1. The control I have just bought doesn't seem to work at run time
  2. I bought a bundle of more than one product, but received one license only
  3. How does the trial version work ?
  4. There is no trial version for this control...
  5. How does the complete version work ?
  6. Why to register a control ?
  7. How to register/unregister a control ?
  8. Which are the required Libraries ?


The control I have just bought doesn't seem to work at run time
You simply forgot to unlock it, all the controls have to be unlocked before use. This means that you have to call the SetLicense(...) method of each object, passing your license number as parameter. Without doing so, the control will be locked (for example it won't redraw in run mode) or behave with the evaluation mode restrictions.

I bought a bundle of more than one product, but received one license only...
The license number you received for the bundle can unlock all the controls which are part of the bundle, there is no need to have multiple numbers.

How does the trial version work ?
Some of the controls are available in trial version: In trial version a nag screen will appear every time the control is instantiated, and usually a limited number of invocations of the control's methods are taken into account, the other ones are ignored. In particular:
  • in Analog Meter HQ in trial mode it is not possible to change the caption, it is fixed to "Analog Meter HQ", there is a small red cross in the middle of the control, the first 20 operations only are processed;
  • in Round Gauge in trial mode it is not possible to change the caption, it is fixed to "Round gauge", there is a fuchsia cross in the middle of the control, the first 20 operations only are processed;
There is no trial version for this control...
Sometimes the trial version is not (yet) available for a control, in this case feel free to download the full version, there will be some restrictions to operate the control without a license number, but you will have the opportunity to have a full prototype of the control. Read the following section too for more details.
How does the complete version work ?
The complete version works in the following way:
  • in design mode (while you put the control in your application's window while working in the development environment), since it is not possible to provide the license number in the development environment, the control usually shows a fixed value.
    For example:
    • the Level Indicator and the Advanced Progress Indicator always show a value of 50% (the average of the minimum and maximum values);
    • the digital displays (both 7-Segments and Matrix) show always the same string;
    • the analog controls (Analog Meter HQ and Round Gauge) are fixed to the minimum value;
  • in running mode (while your application is actually running), the controls will draw themselves and fully work only after the license number have been provided, via a call to the SetLicense(...) method.
Why to register a control
In order to let applications use a component, it has to be registered. This simply means that you have to inform the OS telling to look at the component file, in the directory where it is placed. It is responsibility of the OS to recognize the control and its exported properties and methods in order to let other applications access them.

How to register/unregister a control ?
There are several ways to register a control:
  • by the use of the REGSVR32.EXE program:
    to register a control you simply have to digit the following command:
           REGSVR32 D:\MyDirectory\Control.ocx

    and to unregister a control:
           REGSVR32 /u D:\MyDirectory\Control.ocx

  • by using the ActiveX Control Test Container:
    start the program (it is part of the Visual Studio Tools), select "File", "Register controls..." from the menu. You will see the following dialog box, which can be used to register and unregister controls.

  • by other programs or directly via operating system calls...

Which are the required libraries ?
Only the two following dynamic link libraries are required at run time:
  • MFC42.DLL
  • MSVCRT.DLL
In most cases there will NOT be the need to redistribute these libraries, since they are already present in the distributions of the Microsoft Windows operating systems.