ActiveX Objects

NI IMAQ

ActiveX Objects

ActiveX objects are classified as input and output objects. The objects are grouped according to input parameters and output parameters that are used by particular methods, which reduces the number of parameters that you must pass to those methods.

Note  ActiveX objects in cwimaq.ocx have a CWIMAQ prefix, and objects in cwmv.ocx have a CWMV prefix.

You must create an ActiveX object before you can use it. You can use the New keyword in Visual Basic to create these objects. For example, use the following syntax to create and store an image in a variable named image:

Dim image as New CWIMAQImage

Tip  If you intend to develop your application in Visual C++, National Instruments recommends that you use NI Vision for LabWindows/CVI. However, if you decide to use NI Vision for Visual Basic to develop applications for Visual C++, you can create objects using the respective Create methods on the CWIMAQVision control or CWMachineVision control. For example, to create a CWIMAQImage object, use the CWIMAQVision.CreateCWIMAQImage method.