Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

activex doesn't display anything in Visual Studio

An activeX control placed in a dialog frame doesn't work.
What could be wrong?
 
Thanks in advance.
0 Kudos
Message 1 of 4
(3,625 Views)

Hi Physicien,

It would be helpful to have some more information to about what you are doing.  Would you mind explaining a little more about what you are doing?  For example it would be nice to know what software you are using Active X with and what if any National Instruments hardware you are using.  As well as what you are trying to accomplish.
Adam H
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,603 Views)

Within Visual Studio 2008, I'm creating a new project as an MFC based application with a dialog window. In this window, I place an ActiveX control which make the image acquisition. When compiling and running the application, nothing happens, no acquisition. I'm using a PCI-1410 card with a standard video camera. The setup works fine in MAX.

I assume that this activeX component is all I need to display the grabbed image. It seems this component came with Measurement Studio.

 

0 Kudos
Message 3 of 4
(3,595 Views)

Hi Physicien,

The answer to your question is no.  Simply calling the grab is not all you need to do.   Since it is working in Measurement and Automation Explorer (MAX) we know your hardware is set up properly.  You need to initialize your camera and set up a few things.  We have an example of how to do a grab.  I would suggest taking a look at that and modify it if needed to do what you need.  The examples are located on your hard drive in the following location by default.

C:\Documents and Settings\All Users\Documents\National Instruments\NI-IMAQ\Examples

Adam H
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(3,548 Views)