Selected Property

Summary
Gets the capture size selection state.
Syntax
C#
C++/CLI
public bool Selected { get; set; } 
public: 
property bool Selected { 
   bool get(); 
   void set (    bool ); 
} 

Property Value

true if the size is currently selected; false, otherwise.

Remarks

Assignment can raise an error exception. For more information, refer to the Error Codes.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
public bool _result = false; 
public CaptureCtrlForm _form = new CaptureCtrlForm(); 
 
public void CaptureSizesExample() 
{ 
   // reference the capture control 
   CaptureCtrl capturectrl = _form.CaptureCtrl; 
 
   try 
   { 
      // select a USB video device. use your device's name here 
      if (capturectrl.VideoDevices["USB"] == null) 
         throw new Exception("No USB video device available"); 
 
      capturectrl.VideoDevices["USB"].Selected = true; 
 
      // reference the capture size collection 
      CaptureSizes sizes = capturectrl.VideoCaptureSizes; 
 
      // get the current selection 
      int n = sizes.Selection; 
 
      // loop through all the capture sizes 
      foreach (CaptureSize cs in sizes) 
      { 
         // check some criteria and select one 
         if (cs.Width == 640 && cs.Height == 480) 
         { 
            // select it and break 
            cs.Selected = true; 
            _result = true; 
            break; 
         } 
      } 
   } 
   catch (Exception) 
   { 
      _result = false; 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.