The leading provider of version control solutions and TWAIN SDKs
  • Contact us









SelectMediaTypeByIndex Method

Description

Selects the media type of the current selected souce by the index.

ActiveX Edition Plug-in Edition Mac Edition
Since V8.0 Since V8.0 Not Supported

Syntax

Boolean ObjectName. SelectMediaTypeByIndex(Long Index)

Parameters

Long Index: The media type index of current source. The index is 0-based.

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

When an error occurs and IfThrowException property is TRUE, an exception will be thrown.

When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.

Remarks

This method is proveded for getting the media type of your devices. Before setting the media type index , check the MediaTypeListCount property to get the total media type count in the list and make sure your index is meaningful and correct.

Get the setting result by calling the MediaType property;

See Also

GetMediaTypeByIndex() method, MediaType property, MediaTypeListCount property

Sample

A JavaScript sample is provided.

<script language="javascript">

	function btnSelectMediaTypeByIndex_onclick() {
		
            listcount = Webcam.MediaTypeListCount; 
            alert(listcount); 
            Webcam.SelectMediaTypeByIndex(listcount-1);
            mediatype = Webcam.MediaType;
            alert(mediatype);

	}

</script>