ActiveX - Steps to add an ActiveX Control

<< Click to Display Table of Contents >>

Navigation:  ActiveX Controls >

ActiveX - Steps to add an ActiveX Control

Previous pageReturn to chapter overviewNext page

There are a number of steps to adding an ActiveX control to SpecView:

1. Firstly decide which control is required & ensure its functionality is fully understood, having read the author's documentation.

2. Install the required ActiveX control(s), following the installation procedure supplied with the control. They cannot be installed from within SpecView.

3.  Use: Object->ActiveX Control->Register Controls  to see if the required controls are listed, if not, use the Register button to register them with SpecView.

4. If the ActiveX control is one which has input and/or output values(s) that need to be linked to SpecView's Instrument or User variables, then the required instruments and/or User variables will need to be defined in SpecView.

5. Use: the ActiveX TB_ACTX tool on the toolbar and use the ActiveX cursor cur_ax  to draw the control on the GDW. This can be done by clicking somewhere on the screen & dragging out to the required size, or by just clicking on the screen to position a control using its default size.  (The 'hotspot' of this cursor is by the top of the 'A').

Even controls which don't have any graphical components will need to be placed somewhere on the screen, but as they will not be displayed in Runtime they can be drawn any size, anywhere on the screen.

6. The 'Insert ActiveX Control' box will be displayed:

 

ax_insertcontrol

 

Select the control required,  if it isn't listed, then click [See More ActiveX Controls] to add the control to the list, or if the control isn't shown then the control will need to be Registered & then select the control from the list.

7. When all the required controls have been drawn press the ESC key to restore the cursor to the 'pointer' cur_pointer cursor.

8. Select the control on the GDW.

Note: To select an ActiveX object on a screen (GD3):

- Either move the mouse over the edge of the control, until the cross-hair cursor is shown, then click to select the object.

- Or click the background & drag to enclose the object(s), when the button is released all objects enclosed will be selected.

9. Use: Object->ActiveX Control->Setup  (or Right-Click on the control, or press Alt-Enter) to setup the control according to the author's documentation.

10. If the ActiveX control is one which has input and/or output values(s), which need to be linked to SpecView's Instrument or User variables, then use: Object->ActiveX Control->Link to Variables (or Alt-X)

 

ax_links

 

Input tab: An Input is an input into the Control (SpecView setting a value into it)

 

Output tab: An Output is an output from a Control.

 

Methods tab: A Method is something that can't be classed as an input or output. For example, something that has no inputs or outputs, such as an 'About...' box.

 

Change allowed on remotes checkbox: This is OFF by default.

When checked this allows users logged in from Remote versions of SpecView to change the Inputs on this ActiveX Control. This maybe desirable for a control such as a graphical slider, but NOT desirable for, say, an averaging control.

 

Ignore first value on Outputs checkbox: This is OFF by default.

When checked this means that the very first value out of each Output for this control is ignored. This maybe desirable when the first value is a start-up condition or to be considered as an out of range value.

 

Receive every value checkbox: This is ON by default.

When ON this means that the control receives all changes in values that are set for Inputs to this control.

When set to OFF this means that the control is just sent the latest value when its Inputs are set.

 

This can be used when it is NOT necessary to see all values on a heavily laden system, particularly when the control is being used on a SpecView Remote, or if accurancy is not the control's purpose, or if the latest value is the only relevant value that is needed to be processed.

 

Invoke button: This can be used to run a Method to test it.

 

Enable/Disable button:  Will enable or disable a control. All controls can be enabled/disabled using the File->Preferences ActiveX tab.

 

For example:

If the control is a graphic & it has an Input such as 'BlinkSpeed' then in order to set this it is necessary to read the author's documentation to find out the following information:

- The type of the value, for example, an Integer or a Number with decimals.

- The units of the value (Seconds, tenths of seconds, etc.)

- The range of values.

- Then also whether a related Input parameter needs to be set, for example to 'turn on' the blinking.

To set the BlinkSpeed parameter from a SpecView variable create a SpecView User Variable of the required type & then click the BlinkSpeed parameter on the Input tab, click the Variables List button & select the variable from the list.

 

To set a parameter to a constant value, such as BlinkMode=1 to turn on blinking, replace the word 'ignore' with '1'.  To set a parameter to a color or font select from the dropdown list:

 

ax_selectcolor

 

These constants will be applied on entry to Runtime mode or by clicking the Invoke button.

 

To monitor what is happening with an ActiveX control during Runtime mode via the Event window, it is necessary to check the 'ActiveX Controls' checkbox on the Event Log Setup box from the Setup menu. By default this is not checked as it produces a large number of entries in the Event Log.

 

For information about ActiveX controls and Passwords see here.

See also:

ActiveX Overview

ActiveX Licensing

ActiveX Insert Control

ActiveX Preferences

ActiveX Variables Inputs

ActiveX Variables Outputs

ActiveX Variables Methods

ActiveX Register

ActiveX Manage Control List

ActiveX Control Not Licensed

ActiveX on SpecView Remote

ActiveX Controls and Passwords

ActiveX Controls and Historical Replay

 

Note: Neither the delete key nor the cursor keys will not work when an ActiveX control is on the screen. This is because of uncertainty as to whether these keys are being used within the ActiveX control, or on items on the SpecView screen.