Gets or sets the time delay, in milliseconds, before capturing a DIB or a Picture.
public virtual int CaptureStillDelay {get; set;} Public Overridable Property CaptureStillDelay As Integer A value representing the capture time delay in milliseconds.
Call the CaptureDIB or CaptureImage methods to capture a still image using this capture time delay after the capture session is started.
using Leadtools;using Leadtools.MediaFoundation;using LeadtoolsMediaFoundationExamples.Fixtures;public bool _result = false;public CaptureCtrlForm _form = new CaptureCtrlForm();public void CaptureStillDelayExample(){// reference the capture controlCaptureCtrl capturectrl = _form.CaptureCtrl;// output filestring outFile = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_CaptureStillDelayExample.jpg");try{// set the video capture device, use your capture device name hereif (capturectrl.VideoDevices["USB"] == null)throw new Exception("No USB video device available");capturectrl.VideoDevices["USB"].Selected = true;// set the still capture delaycapturectrl.CaptureStillDelay = 1000;// set the capture mode to still and startcapturectrl.StartCapture(CaptureMode.Still);// get a still imageImage image = capturectrl.CaptureImage();if (image != null)image.Save(outFile, ImageFormat.Jpeg);// stop the capturecapturectrl.StopCapture();// check for the capture file and set the resultif (File.Exists(Path.Combine(Directory.GetCurrentDirectory(), outFile)))_result = true;}catch (Exception){_result = false;}}static class LEAD_VARS{public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media";}
Imports LeadtoolsImports Leadtools.MediaFoundationImports LeadtoolsMediaFoundationExamples.FixturesPublic _result As Boolean = FalsePublic _form As New CaptureCtrlForm()Public Sub CaptureStillDelayExample()' reference the capture controlDim capturectrl As CaptureCtrl = _form.CaptureCtrl' output fileDim outFile As String = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_CaptureStillDelayExample.jpg")Try' set the video capture device, use your capture device name hereIf capturectrl.VideoDevices("USB") Is Nothing ThenThrow New Exception("No USB video device available")End Ifcapturectrl.VideoDevices("USB").Selected = True' set the still capture delaycapturectrl.CaptureStillDelay = 1000' set the capture mode to still and startcapturectrl.StartCapture(CaptureMode.Still)' get a still imageDim image As Image = capturectrl.CaptureImage()If image IsNot Nothing Thenimage.Save(outFile, ImageFormat.Jpeg)End If' stop the capturecapturectrl.StopCapture()' check for the capture file and set the resultIf File.Exists(Path.Combine(Directory.GetCurrentDirectory(), outFile)) Then_result = TrueEnd IfCatch generatedExceptionName As Exception_result = FalseEnd TryEnd SubPublic NotInheritable Class LEAD_VARSPublic Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"End Class
|
Products |
Support |
Feedback: CaptureStillDelay Property - Leadtools.MediaFoundation |
Introduction |
Help Version 19.0.2017.6.16
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.