LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to learn how to use active X with LabWindows CVI 7.0 and I'm just not getting it. The tutorials don't address my needs. Any suggestions on where to look for help?

I have an .ocx file and I created a FP with it, I don't understand how to initialize it as a control and access the methods inside it.
0 Kudos
Message 1 of 2
(2,951 Views)
1. You first need to register the OCX. Open a command prompt window and enter the following:
regsrvr32 c:\windows\system\your_ocx.ocx
(Where c:\windows\system\your_ocx.ocx is whatever path and filename you want to register.)
2. Then in the UIR editor for your CVI project, right-click on an empty spot on the panel, and select ActiveX.
3. Scroll to the name of the Active X control you want, then click OK.
4. Right-click on the new control and select Generate ActiveX Control Driver. Note: if you are just starting a new project, you can let CVI perform this step when you Generate >> All Code.
5. In the Active X Control Wizard, click on Browse and place the .fp file in your CVI project directory (or some library directory).
6. In the Active X Control Wizard, click on Add .fp File To Project, then click on Next >> Next >> Close.
7. In the code window for the .c file where you want to add code for the ActiveX control, goto the Instrument menu and select the instrument for the ActiveX control.
8. Select the function panel for whatever function you want to call and use its function panel to setup and insert the function calls.
0 Kudos
Message 2 of 2
(2,947 Views)