Hello,
You could call the CWIMAQ.Configure() function and look at its return value to determine if the interface that has been specified is valid. This would involve implementing your own error checking method to check the error type and then perhaps display a message asking the user to check the power and signal connections for the camera.
You could also try using a DLL to call the imgInterfaceQueryNames(uInt32 index, char* name) function. This function returns the interface name identified by the index parameter. In order to obtain a list of all the available interface names, call this function several times until the function returns an error. Each time, the index input will be incremented.
I would suggest using one of those methods to determine if the camera is properly connected and powered.
There is no way to attach your acquisition to the PictureBox control so that it will display images as they are acquired. With that control, you could acquire images and then update that display programmatically, but there is no way to do it without additional code. The CWIMAQViewer control was developed specifically so that an image acquisition could be directly attached to it.
Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments