Assign Port to each CVB Display Control

Hello Illusive,
I have 5 cameras and 5 ports, so how can I assign the port I want for each axCVImage?
Thank you!

Hi @George,

first of all, as already pointed out by @illusive, the old ActiveX controls are not quiet what you should aim for as long as there is not a very good reason to do so.
For everyone that came here using the search option, heres why:

Usually you have a DisplayControl in CVB and simply assign it the DeviceImage of you loaded driver, on which you can beforehand change the port to work on the desired device.

With the LoadImageByDialog() of the ocx I am not exactly sure how you would do this as convenient.

Two ideas: Set the AutoSwitchEnabled property in the GenICam.ini to 1. Thus every time you load a driver, the camera from the highest possible port will be loaded (with this feature set to 0 you will load the first device on port 0 and afterwards you cannot load another one as Port 0 is already blocked).
Problem: Which device will be loaded to which Display now depends on the order you click the “Load Driver” buttons.

Second idea:
Check this tutorial:
%cvb%\Tutorial\Image Manager\CSharp\CSMultiCam

Here a axCVGrabberOcx is used to handle the Port for each device in the ImageForm class. Maybe this is what you need.


Thank you very much Chris