Gain
Top  Previous  Next

Description

Returns or sets the row value of the gain


Syntax


[VB]
objActiveDcam.Gain [= Value]


[C/C++]
HRESULT get_Gain( long *pGain );
HRESULT put_Gain( long Gain );



Data Type
[VB]

Long

Parameters
[C/C++]

pGain [out,retval]  
Pointer to the current gain value  
Gain [in]  
The gain value to be set  


Return Values


S_OK  
Success  
E_FAIL  
The gain control is not available for the selected camera  
E_INVALIDARG  
The value is out of range  
 

Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the camera's gain.

Private Sub
 Form_Load()

ActiveDcam1.Acquire=
True

HScroll1.Value = ActiveDcam1.Gain
HScroll1.Min = ActiveDcam1.GetGainMin
HScroll1.Max = ActiveDcam1.GetGainMax
End Sub


Private Sub
 HScroll1_Scroll()

ActiveDcam1.Gain = HScroll1.Value

End Sub

 

Remarks


This property changes the camera's video signal amplification. The valid property range is reported by the GetGainMin and GetGainMax methods. Note that the property is available only if the currently selected camera supports software gain control.