Use Built-In Property Dialog Boxes Short code snippet that illustrates how to modify device properties using the property dialog box that ship with IC Imaging Control.
IC Imaging Control allows devices settings, such as "Brightness", "Contrast" or "Exposure Time" to be adjusted, using shipped dialog boxes. This brief source code sample illustrates how to carry out such adjustments. The window of the resulting application looks as follows: The property pages look as follows: The program starts by opening the built-in dialog that allows the user to select a video capture device (.ShowDeviceSettingsDialog). At the end of the function Form1_Load(), the live image data stream from the video capture device is displayed, using .LiveStart. C# private void Form1_Load(object sender, System.EventArgs e) { icImagingControl1.ShowDeviceSettingsDialog(); if( icImagingControl1.DeviceValid ) { icImagingControl1.LiveStart(); } else { Close(); } } VB.NET Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load IcImagingControl1.ShowDeviceSettingsDialog() If IcImagingControl1.DeviceValid Then IcImagingControl1.LiveStart() Else Me.Close() End If End Sub When the user clicks "Properties...", the program activates the built-in dialog (.ShowPropertyDialog()) to adjust the device settings: C# private void btnProperties_Click(object sender, System.EventArgs e) { if( icImagingControl1.DeviceValid ) { icImagingControl1.ShowPropertyDialog(); } } VB.NET Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click IcImagingControl1.ShowPropertyDialog() End Sub |