
| Language: | Visual Basic 6 |
| Version: | 3.0.3 |
| Released on: | April 7, 2005 |
| Author: | IC Imaging Control Support Department |
| Requirements: | IC Imaging Control >2.1 Camera, converter or grabber with WDM Stream Class drivers. |
| |
The following diagram shows how you can use IC Imaging Control to modify the settings of a codec.
The sample application's window looks as follows:

First of all, the program fills the list lstCodecs with the names of all codecs that are installed on your system (see dialog on the right). This first step is based on the collection .AviCompressors. .AviCompressors.Count indicates the number of codecs found, while .AviCompressors(i) returns information about the i'th codec (as for instance its name):
Private Sub Form_Load() cmdCodecSettings.Enabled = False For i = 1 To ICImagingControl1.AviCompressors.Count lstCodecs.AddItem ICImagingControl1.AviCompressors(i).Name Next i End Sub
When the user clicks one of the codecs, the event handler calls the according AviCompressor object and checks whether this codec provides a property page (AviCompressor.PropertyPageAvailable):
Private Sub lstCodecs_Click() Set codec = ICImagingControl1.AviCompressors(lstCodecs.ListIndex + 1) cmdCodecSettings.Enabled = codec.PropertyPageAvailable End Sub
Clicking on "Codec Settings...", the user opens a dialog to modify the selected codec's settings:
Private Sub cmdCodecSettings_Click() codec.ShowPropertyPage End Sub
Disclaimer
The source code that appears in the IC Imaging Control Source Code Library is indented for educational purposes only. The Imaging Source Europe GmbH, the manufacturer of IC Imaging Control, does not assume any kind of warranty expressed or implied, resulting from the use of the content of this page.