HasDialog Method

Summary
Indicates whether the specified property's dialog is available.
Syntax
C#
C++/CLI
public bool HasDialog( 
   TargetFormatDlg Dialog 
) 
public: 
bool HasDialog(  
   TargetFormatDlg Dialog 
)  

Parameters

Dialog
A TargetFormatDlg value that specifies which dialog's availability is being queried.

Return Value

true if the specified property's dialog is available; otherwise, it is false

Remarks

Indicates whether the specified property's dialog is available.

Example
C#
using Leadtools; 
using Leadtools.MediaFoundation; 
using LeadtoolsMediaFoundationExamples.Fixtures; 
 
 
public bool _result = false; 
public CaptureCtrlForm _form = new CaptureCtrlForm(); 
 
public void HasDialogExample() 
{ 
   // reference the capture control 
   CaptureCtrl capturectrl = _form.CaptureCtrl; 
 
   try 
   { 
      // set a video device first, you should use your video device name here 
      if (capturectrl.VideoDevices["Analog"] == null) 
         throw new Exception("No Analog audio device available"); 
 
      capturectrl.VideoDevices["Analog"].Selected = true; 
 
      // select the WMV target format 
      TargetFormat tf = capturectrl.TargetFormats[TargetFormatType.WMV]; 
      tf.Selected = true; 
 
      // The HasDialog method tells us that the control 
      // can display the desired settings dialog. 
      // check to see if the Profile dialog is available 
      if (tf.HasDialog(TargetFormatDlg.Profile)) 
      { 
         // show the dialog 
         tf.ShowDialog(TargetFormatDlg.Profile, _form); 
 
         // set the result 
         _result = true; 
      } 
   } 
   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.MediaFoundation Assembly

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