Indicates whether the specified property's dialog is available.
public bool HasDialog(
TargetFormatDlg Dialog
)
Public Function HasDialog( _
ByVal Dialog As TargetFormatDlg _
) As Boolean
public:
bool HasDialog(
TargetFormatDlg Dialog
)
Dialog
A TargetFormatDlg value that specifies which dialog's availability is being queried.
true if the specified property's dialog is available; otherwise, it is false
Indicates whether the specified property's dialog is available.
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;
}
}
Imports Leadtools
Imports Leadtools.MediaFoundation
Imports LeadtoolsMediaFoundationExamples.Fixtures
Public _result As Boolean = False
Public _form As CaptureCtrlForm = New CaptureCtrlForm()
Public Sub HasDialogExample()
' reference the capture control
Dim capturectrl As CaptureCtrl = _form.CaptureCtrl
Try
' set a video device first, you should use your video device name here
If capturectrl.VideoDevices("Analog") Is Nothing Then
Throw New Exception("No Analog audio device available")
End If
capturectrl.VideoDevices("Analog").Selected = True
' select WMV target format
Dim tf As TargetFormat = 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) Then
' show the dialog
tf.ShowDialog(TargetFormatDlg.Profile, _form)
' set the result
_result = True
End If
Catch e1 As Exception
_result = False
End Try
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document