Point of View Software Frequently Asked Questions
Question
How to insert and configure an Active-X object in a Studio application?
Answer
To insert an Active-X object in a Studio application:
- Select the ribbon option Graphics → ActiveX object;
- Select the ActiveX object to be inserted in the application from the list box and press the OK button. The ActiveX
object will then appear on the screen. (Unregistered ActiveX objects will not be available on this list box);
- Double-click on the ActiveX object and assign a Name to it (fill in the Name field). The dynamic Properties and
Methods list can be viewed by selecting the Configuration > Methods buttons. The static properties can be set by
pressing the Properties button. A detailed description about the objects properties can be found in the component
documentation, provided by the component developer.
There are three functions to access the ActiveX component during the runtime:
- XGet(strName, strProperties): Returns the value of the properties from the object .
The list of properties that can be read from the object are listed in the Configuration > Methods dialog from the
object, with the syntax (PropGet) – for example: Color (PropGet).
- XSet(strName, strProperties, Value): Writes the value to the properties of the object
. The list of properties that can be set to the object are listed in the Configuration > Methods dialog
from the object, with the syntax (PropPut) – for example: Colot (PropPu).
- XRun(strName, strMethod, Parameter1, Parameter2, … , ParameterN): Executes the method
from the object , according to the parameters , , …, . The
list of methods available in the object is listed in the Configuration > Methods dialog from the object, with the
syntax (Method) – for example: OpenFile (Method).
Tips: Before inserting an Active-X component (usually an OCX file) into the application, make sure it has been
properly registered in the computer. You can register an Active-X object from. Select the menu option Home →
Register Controls, press the Register button and select the Active-X file (usually an OCX file) which must be
registered.
Note: The amount of parameters set in the XRun() function can vary from 0 to 255, depending on each ActiveX
component. You can use tags to set the parameters;
FAQ Subcategory: None
This item was last updated on 2014-02-07
Document ID: 1473
The information provided in the AutomationDirect
knowledge base is provided "as is" without warranty of any
kind. AutomationDirect disclaims all warranties, either
express or implied, including the warranties of
merchantability and fitness for a particular purpose. In no
event shall AutomationDirect or its suppliers be liable
for any damages whatsoever including direct, indirect,
incidental, consequential, loss of business profits or
special damages, even if AutomationDirect or its
suppliers have been advised of the possibility of such
damages. Some states do not allow the exclusion of
limitation of liability for consequential or incidental
damages so the foregoing limitation may not apply.