Error processing SSI file
LEADTOOLS Multimedia (Leadtools.MediaFoundation assembly)

Show in webframe

ShowDialog Method (TargetFormat)






A TargetFormatDlg enumeration value that specifies which dialog to show.
Value that specifies the dialog owner's window handle.
Displays the specified property's dialog.
Syntax
public void ShowDialog( 
   TargetFormatDlg Dialog,
   IWin32Window hWnd
)
'Declaration
 
Public Sub ShowDialog( _
   ByVal Dialog As TargetFormatDlg, _
   ByVal hWnd As IWin32Window _
) 
'Usage
 
Dim instance As TargetFormat
Dim Dialog As TargetFormatDlg
Dim hWnd As IWin32Window
 
instance.ShowDialog(Dialog, hWnd)
public:
void ShowDialog( 
   TargetFormatDlg Dialog,
   IWin32Window^ hWnd
) 

Parameters

Dialog
A TargetFormatDlg enumeration value that specifies which dialog to show.
hWnd
Value that specifies the dialog owner's window handle.
Remarks
Displays the specified property's dialog. If the method fails, an error is raised. For more information, refer to the Error Codes.
Example
Copy Code  
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
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

See Also

Reference

TargetFormat Class
TargetFormat Members

Error processing SSI file
Leadtools.MediaFoundation requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features