Creating a Basic LEADTOOLS DirectShow Convert Application
Perform the following steps to create and run a multimedia conversion application using the LEADTOOLS Multimedia ConvertCtrl control.
Start Visual Studio .NET.
Choose File->New->Project... from the main menu.
In the New Project dialog box, choose either "**Visual C\
Type the project name as "Multimedia Convert" in the Project Name field and if desired, type a new location for your project or navigate to it using the Browse button, and then click OK.
In the "Solution Explorer" window, right-click the "References" folder, and select "Add Reference..." from the context menu. In the "Add Reference" dialog box, click the ".NET" tab, select Leadtools.Multimedia and click OK. If this DLL does not appear under the .NET tab, click the Browse tab, navigate to the "<LEADTOOLS_INSTALLDIR>\Bin\Dotnet\Win32" folder and select the following DLL:
With the DLL selected, click OK to add the DLL to the application.
Make sure Form1 is in design view. Go to the toolbox (View->Toolbox) and drag a ConvertCtrl control onto the form. NOTE: If you do not have the ConvertCtrl in your toolbox, open the main menu and select Tools->Choose Toolbox Items. If this DLL does not appear under the .NET tab, click the Browse tab, navigate to the "<LEADTOOLS_INSTALLDIR>\Bin\Dotnet\Win32" folder, and select the following DLL: Click Browse and then select Leadtools.Multimedia.dll from "<LEADTOOLS_INSTALLDIR>\Bin\Dotnet\Win32" and then click Open and then click OK. After adding it to the form, set the following properties for the conversion control:
Property | Value |
---|---|
Name | _convertctrl |
Anchor | Top, Bottom, Left, Right |
BackColor | Black |
Go to the toolbox (View->Toolbox) and drag a ProgressBar control onto the form (below the conversion control) and set the following properties:
Property | Value |
---|---|
Name | _progress |
Anchor | Bottom, Left, Right |
Step | 1 |
Go to the toolbox (View->Toolbox) and drag a Button control to the bottom of the form and set the following properties:
Property | Value |
---|---|
Name | _buttonConvert |
Text | Convert |
Anchor | Bottom, Right |
Switch Form1 to code view (right-click Form1 in the Solution Explorer, choose View Code) and add the following lines to the beginning of the file:
Declare the following private variables:
Add an event handler to the Form1 Load event and code it as follows:
Add an event handler to the _convertctrl Progress event and code it as follows:
Add an event handler to the _convertctrl Complete event and code it as follows:
Add an event handler to the _buttonConvert Click event and code it as follows:
Build, and Run the program to test it.
Products |
Support |
Feedback: Projects" or "VB Projects**" in the Projects Type List, and select "Windows Forms Application" in the Templates List. |
Introduction |
Help Version 19.0.2017.6.16
|