ByteScout SWF To Video SDK - C# - Conversion Progress GUI - ByteScout

ByteScout SWF To Video SDK – C# – Conversion Progress GUI

  • Home
  • /
  • Articles
  • /
  • ByteScout SWF To Video SDK – C# – Conversion Progress GUI

conversion progress GUI in C# with ByteScout SWF To Video SDK

Tutorial: how to do conversion progress GUI in C#

Today you are going to learn how to conversion progress GUI in C#. ByteScout SWF To Video SDK helps with conversion progress GUI in C#. ByteScout SWF To Video SDK is the library that can take SWF (Flash Macromedia) files and convert into WMV or AVI video with sound. Dynamic flash movie scenes, variables, actionscripts are supported and you also may adjust output video size, framerate and quality.

Fast application programming interfaces of ByteScout SWF To Video SDK for C# plus the instruction and the C# code below will help you quickly learn conversion progress GUI. Follow the instruction from the scratch to work and copy and paste code for C# into your editor. You can use these C# sample examples in one or many applications.

Visit our website provides for free trial version of ByteScout SWF To Video SDK. Free trial includes lots of source code samples to help you with your C# project.

Try ByteScout SWF To Video SDK today: Get 60 Day Free Trial or sign up for Web API

Form1.Designer.cs
      
namespace ConversionProgressGUI { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #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 void InitializeComponent() { this.buttonConvert = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.SuspendLayout(); // // buttonConvert // this.buttonConvert.Location = new System.Drawing.Point(18, 67); this.buttonConvert.Name = "buttonConvert"; this.buttonConvert.Size = new System.Drawing.Size(254, 23); this.buttonConvert.TabIndex = 0; this.buttonConvert.Text = "Convert test.swf with conversion preview"; this.buttonConvert.UseVisualStyleBackColor = true; this.buttonConvert.Click += new System.EventHandler(this.buttonConvert_Click); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.label1.Location = new System.Drawing.Point(15, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(126, 13); this.label1.TabIndex = 2; this.label1.Text = "Conversion progress:"; // // progressBar1 // this.progressBar1.Location = new System.Drawing.Point(18, 28); this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(254, 23); this.progressBar1.TabIndex = 3; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(284, 102); this.Controls.Add(this.progressBar1); this.Controls.Add(this.label1); this.Controls.Add(this.buttonConvert); this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Form1"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button buttonConvert; private System.Windows.Forms.Label label1; private System.Windows.Forms.ProgressBar progressBar1; } }

Try ByteScout SWF To Video SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

Form1.cs
      
using System; using System.Windows.Forms; using BytescoutSWFToVideo; namespace ConversionProgressGUI { public partial class Form1 : Form { public const int WM_APP = 0x8000; public const int WM_CONVERSION_PROGRESS = WM_APP + 1; SWFToVideoClass swf = new SWFToVideoClass(); public Form1() { InitializeComponent(); } private void buttonConvert_Click(object sender, EventArgs e) { if (!swf.IsRunning) { swf.SWFConversionMode = SWFConversionModeType.SWFAnimation; swf.ConversionTimeOut = 5000; swf.InputSWFFileName = "test.swf"; swf.OutputVideoFileName = "test.wmv"; swf.SetProgressNotifyWindow(Handle.ToInt32(), WM_CONVERSION_PROGRESS, 0); swf.Run(); } } protected override void WndProc(ref Message m) { if (m.HWnd == Handle && m.Msg == WM_CONVERSION_PROGRESS) { progressBar1.Value = m.WParam.ToInt32(); } base.WndProc(ref m); } } }

Try ByteScout SWF To Video SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

Program.cs
      
// x64 IMPORTANT NOTE: set CPU to x86 to build in x86 mode. WHY? Because flash is not supported on x64 platform currently at all using System; using System.Windows.Forms; namespace ConversionProgressGUI { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }

Try ByteScout SWF To Video SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

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

Explore ByteScout SWF To Video SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next