Camera
Top  Previous  Next

Description

Returns or sets the index of the currently selected camera. If no GenTL-compatible camera is connected to the system, the property will return -1.


Syntax

[VB]
objActiveGeni.Camera [= Value]


[C/C++]
HRESULT get_Camera( long *pCamera );
HRESULT put_Camera( long Camera );



Data Type
[VB]

Long


Parameters
[C/C++]

pCamera [out, retval]  
Pointer to the camera's index  
Camera [in]  
The index of the camera to be selected  


Return Values


S_OK  
Success  
E_FAIL  
The specified camera cannot be selected.  
E_INVALIDARG  
The camera's index is out of range.  
 

Example


This VB example initializes a combo box with camera names and uses it to switch between the cameras:

Private Sub
 Form_Load()
CamLst = ActiveGeni1.GetCameraList
For
 i = 0 
To
 
UBound
(CamLst)
Combo1.AddItem (CamLst(i))
Next

Combo1.ListIndex = 0
ActiveGeni1.Acquire = 
True
End Sub

Private Sub
 Combo1_Click()
ActiveGeni1.Camera = Combo1.ListIndex
End Sub

 

Remarks


The value of the property is a zero-based index into the list of GenTL compatible devices found on the system. The list of device names can be retrieved with GetCameraList. If you use the property window of your development environment or ActiveGeni's property pages, the Camera property field will be presented as a list box containing the indexes and names of all the connected cameras.