I prefer that when the user selects a camera option from the ComboBox, automatically the application should start that camera and show a stream of captured frames into the imagebox.
For this, we have to generate an event that occurs when the comboBox index is changed. Fortunately a ComboBox has this EXACT event property! We will use that.
On that note, pardon me for the off-track talk, but now you know why my tutorials focus on .NET and C# ; because things in it are so ready-made, easy to use AND visual! :D Anyhow, back to business…
As shown in figure 2.2 below,
Select cbCamIndex .
Go to its properties.
Select its ‘Events’ by clicking the thunder bolt icon.
Then scroll down to the SelectedIndexChanged event and Double click it to generate its event handler (function) just like you generate a button click event handler by double clicking a button.