ByteScout Image To Video SDK - VB.NET - Conversion Progress GUI - ByteScout

ByteScout Image To Video SDK – VB.NET – Conversion Progress GUI

  • Home
  • /
  • Articles
  • /
  • ByteScout Image To Video SDK – VB.NET – Conversion Progress GUI

conversion progress GUI in VB.NET and ByteScout Image To Video SDK

Write code in VB.NET to make conversion progress GUI with this How-To tutorial

Today we will explain the steps and algorithm of implementing conversion progress GUI and how to make it work in your application. ByteScout Image To Video SDK was made to help with conversion progress GUI in VB.NET. ByteScout Image To Video SDK is the software development kit that can take a set of images and generate video slide show from them. Includes built-in support for 100+ of 2-D and 3-D slide transitions effects. Supports output in WMV, AVI, WEBM video formats.

Fast application programming interfaces of ByteScout Image To Video SDK for VB.NET plus the instruction and the VB.NET code below will help you quickly learn conversion progress GUI. VB.NET sample code is all you need: copy and paste the code to your VB.NET application’s code editor, add a reference to ByteScout Image To Video SDK (if you haven’t added yet) and you are ready to go! Enjoy writing a code with ready-to-use sample VB.NET codes to implement conversion progress GUI using ByteScout Image To Video SDK.

ByteScout Image To Video SDK free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.

Try it today: Get 60 Day Free Trial or sign up for Web API

ConversionProgressGUI.VS2005.vbproj
      
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{7E6AB036-F9A0-4CEA-8E05-759FF0594510}</ProjectGuid> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ConversionProgressGUI</RootNamespace> <AssemblyName>ConversionProgressGUI</AssemblyName> <StartupObject>ConversionProgressGUI.Program</StartupObject> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" /> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Compile Include="Form1.Designer.vb"> <DependentUpon>Form1.vb</DependentUpon> </Compile> <Compile Include="Form1.vb"> <SubType>Form</SubType> </Compile> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> <Compile Include="Properties\Resources.Designer.vb"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.vb"> <DesignTimeSharedInput>True</DesignTimeSharedInput> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> </Compile> <EmbeddedResource Include="Form1.resx"> <SubType>Designer</SubType> <DependentUpon>Form1.vb</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <LastGenOutput>Resources.Designer.vb</LastGenOutput> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> </EmbeddedResource> <None Include="Properties\Settings.settings"> <LastGenOutput>Settings.Designer.vb</LastGenOutput> <Generator>SettingsSingleFileGenerator</Generator> </None> <COMReference Include="BytescoutImageToVideo"> <Guid>{5212739C-A95B-4CDA-B116-F540A549B648}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>0</VersionMinor> <Lcid>0</Lcid> <WrapperTool>tlbimp</WrapperTool> <Isolated>False</Isolated> <EmbedInteropTypes>True</EmbedInteropTypes> </COMReference> <COMReference Include="stdole"> <Lcid>0</Lcid> <VersionMinor>0</VersionMinor> <VersionMajor>2</VersionMajor> <Guid>{00020430-0000-0000-C000-000000000046}</Guid> <WrapperTool>primary</WrapperTool> <Isolated>False</Isolated> </COMReference> </ItemGroup> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

ConversionProgressGUI.VS2008.vbproj
      
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{7E6AB036-F9A0-4CEA-8E05-759FF0594510}</ProjectGuid> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ConversionProgressGUI</RootNamespace> <AssemblyName>ConversionProgressGUI</AssemblyName> <StartupObject>ConversionProgressGUI.Program</StartupObject> <OldToolsVersion>2.0</OldToolsVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.Targets" /> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Compile Include="Form1.Designer.vb"> <DependentUpon>Form1.vb</DependentUpon> </Compile> <Compile Include="Form1.vb"> <SubType>Form</SubType> </Compile> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> <Compile Include="Properties\Resources.Designer.vb"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.vb"> <DesignTimeSharedInput>True</DesignTimeSharedInput> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> </Compile> <EmbeddedResource Include="Form1.resx"> <SubType>Designer</SubType> <DependentUpon>Form1.vb</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <LastGenOutput>Resources.Designer.vb</LastGenOutput> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> </EmbeddedResource> <None Include="Properties\Settings.settings"> <LastGenOutput>Settings.Designer.vb</LastGenOutput> <Generator>SettingsSingleFileGenerator</Generator> </None> <COMReference Include="BytescoutImageToVideo"> <Guid>{5212739C-A95B-4CDA-B116-F540A549B648}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>0</VersionMinor> <Lcid>0</Lcid> <WrapperTool>tlbimp</WrapperTool> <Isolated>False</Isolated> <EmbedInteropTypes>True</EmbedInteropTypes> </COMReference> <COMReference Include="stdole"> <Lcid>0</Lcid> <VersionMinor>0</VersionMinor> <VersionMajor>2</VersionMajor> <Guid>{00020430-0000-0000-C000-000000000046}</Guid> <WrapperTool>primary</WrapperTool> <Isolated>False</Isolated> </COMReference> </ItemGroup> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

ConversionProgressGUI.VS2010.vbproj
      
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{7E6AB036-F9A0-4CEA-8E05-759FF0594510}</ProjectGuid> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ConversionProgressGUI</RootNamespace> <AssemblyName>ConversionProgressGUI</AssemblyName> <StartupObject>ConversionProgressGUI.Program</StartupObject> <OldToolsVersion>3.5</OldToolsVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.Targets" /> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Compile Include="Form1.Designer.vb"> <DependentUpon>Form1.vb</DependentUpon> </Compile> <Compile Include="Form1.vb"> <SubType>Form</SubType> </Compile> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> <Compile Include="Properties\Resources.Designer.vb"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.vb"> <DesignTimeSharedInput>True</DesignTimeSharedInput> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> </Compile> <EmbeddedResource Include="Form1.resx"> <SubType>Designer</SubType> <DependentUpon>Form1.vb</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <LastGenOutput>Resources.Designer.vb</LastGenOutput> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> </EmbeddedResource> <None Include="Properties\Settings.settings"> <LastGenOutput>Settings.Designer.vb</LastGenOutput> <Generator>SettingsSingleFileGenerator</Generator> </None> <COMReference Include="BytescoutImageToVideo"> <Guid>{5212739C-A95B-4CDA-B116-F540A549B648}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>0</VersionMinor> <Lcid>0</Lcid> <WrapperTool>tlbimp</WrapperTool> <Isolated>False</Isolated> <EmbedInteropTypes>True</EmbedInteropTypes> </COMReference> <COMReference Include="stdole"> <Lcid>0</Lcid> <VersionMinor>0</VersionMinor> <VersionMajor>2</VersionMajor> <Guid>{00020430-0000-0000-C000-000000000046}</Guid> <WrapperTool>primary</WrapperTool> <Isolated>False</Isolated> </COMReference> </ItemGroup> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

Form1.Designer.vb
      
Partial Class Form1 ''' <summary> ''' Required designer variable. ''' </summary> Private components As System.ComponentModel.IContainer = Nothing ''' <summary> ''' Clean up any resources being used. ''' </summary> ''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> Protected Overloads Overrides Sub Dispose(disposing As Boolean) If disposing AndAlso (components IsNot Nothing) Then components.Dispose() End If MyBase.Dispose(disposing) End Sub #Region "Windows Form Designer generated code" ''' <summary> ''' Required method for Designer support - do not modify ''' the contents of this method with the code editor. ''' </summary> Private Sub InitializeComponent() Me.buttonConvert = New System.Windows.Forms.Button Me.label1 = New System.Windows.Forms.Label Me.progressBar1 = New System.Windows.Forms.ProgressBar Me.SuspendLayout() ' 'buttonConvert ' Me.buttonConvert.Location = New System.Drawing.Point(18, 57) Me.buttonConvert.Name = "buttonConvert" Me.buttonConvert.Size = New System.Drawing.Size(254, 33) Me.buttonConvert.TabIndex = 0 Me.buttonConvert.Text = "Convert slides with conversion preview" Me.buttonConvert.UseVisualStyleBackColor = True ' 'label1 ' Me.label1.AutoSize = True Me.label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.label1.Location = New System.Drawing.Point(15, 9) Me.label1.Name = "label1" Me.label1.Size = New System.Drawing.Size(126, 13) Me.label1.TabIndex = 2 Me.label1.Text = "Conversion progress:" ' 'progressBar1 ' Me.progressBar1.Location = New System.Drawing.Point(18, 28) Me.progressBar1.Name = "progressBar1" Me.progressBar1.Size = New System.Drawing.Size(254, 23) Me.progressBar1.TabIndex = 3 ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(284, 102) Me.Controls.Add(Me.progressBar1) Me.Controls.Add(Me.label1) Me.Controls.Add(Me.buttonConvert) Me.Name = "Form1" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Form1" Me.ResumeLayout(False) Me.PerformLayout() End Sub #End Region Private WithEvents buttonConvert As System.Windows.Forms.Button Private label1 As System.Windows.Forms.Label Private progressBar1 As System.Windows.Forms.ProgressBar End Class

Try it today: Get 60 Day Free Trial or sign up for Web API

Form1.vb
      
Imports System.Windows.Forms Imports BytescoutImageToVideo Public Partial Class Form1 Inherits Form Public Const WM_APP As Integer = &H8000 Public Const WM_CONVERSION_PROGRESS As Integer = WM_APP + 1 Private converter As New ImageToVideo() Public Sub New() InitializeComponent() converter.RegistrationName = "demo" converter.RegistrationKey = "demo" End Sub Private Sub buttonConvert_Click(ByVal sender As Object, ByVal e As EventArgs) Handles buttonConvert.Click If Not converter.IsRunning Then ' Set default "in" effect for slides (you can also set effects for each single slide) converter.Slides.DefaultSlideInEffect = 1 ' teFadeIn (1) - fades in effect for slides transition converter.Slides.DefaultSlideInEffectDuration = 500 ' 500 msec for in effect ' Add images and set the duration for every slide Dim slide As Slide slide = converter.AddImageFromFileName("..\..\..\..\slide1.jpg") slide.Duration = 3000 ' 3000ms = 3s slide = converter.AddImageFromFileName("..\..\..\..\slide2.jpg") slide.Duration = 3000 slide = converter.AddImageFromFileName("..\..\..\..\slide3.jpg") slide.Duration = 3000 ' Set output video size converter.OutputWidth = 400 converter.OutputHeight = 300 ' Set output video file name converter.OutputVideoFileName = "result.wmv" ' Set progress notification target window converter.SetProgressNotifyWindow(Handle.ToInt32(), WM_CONVERSION_PROGRESS, 0) ' Run the conversion converter.Run() End If End Sub Protected Overloads Overrides Sub WndProc(ByRef m As Message) If m.HWnd = Handle AndAlso m.Msg = WM_CONVERSION_PROGRESS Then progressBar1.Value = m.WParam.ToInt32() End If MyBase.WndProc(m) End Sub End Class

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
Imports System.Windows.Forms NotInheritable Class Program Private Sub New() End Sub <STAThread()> _ Friend Shared Sub Main() Application.EnableVisualStyles() Application.SetCompatibleTextRenderingDefault(False) Application.Run(New Form1()) End Sub End Class

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout Image To Video SDK page

Explore ByteScout Image To Video SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next