Focus Property
Description
Returns or sets the focus value available within the Source. This is a runtime property.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V8.0 | Since V8.0 | Not Supported |
Data type
Long.
Syntax
ObjectName. Focus
Remarks
Using this property after calling OpenSource() method and before calling AcquireImage().
When an error occurs and IfThrowException property is TRUE, an exception will be thrown. Check ErrorCode property and ErrorString property for error information.
See also
FocusMinValue property, FocusMaxValue property, FocusStepDelta property, FocusDefaultValue property, IfAutoFocus property
Sample
A JavaScript sample is provided.
<script language="javascript">
function btnManageFocus_onclick() {
Webcam.OpenSource();
Focus = Webcam.Focus; //get the Focus value
FocusMinValue = Webcam.FocusMinValue;//get the minimum Focus value
FocusMaxValue = Webcam.FocusMaxValue;//get the maximum Focus value
FocusDefaultValue = Webcam.FocusDefaultValue;//get the default Focus value
FocusStepDelta = Webcam.FocusStepDelta;//get the Focus step delta
Webcam.Focus = 1;//change the Focus value to 1
Focus = Webcam.Focus; //get the Focus value
}
</script>
Copyright © 2012 Dynamsoft Corporation.All Rights Reserved.
