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.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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; } }
60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page
Explore ByteScout SWF To Video SDK Documentation
Explore Samples
Sign Up for ByteScout SWF To Video SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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); } } }
60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page
Explore ByteScout SWF To Video SDK Documentation
Explore Samples
Sign Up for ByteScout SWF To Video SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
// 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()); } } }
60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page
Explore ByteScout SWF To Video SDK Documentation
Explore Samples
Sign Up for ByteScout SWF To Video SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout SWF To Video SDK Home Page
Explore ByteScout SWF To Video SDK Documentation
Explore Samples
Sign Up for ByteScout SWF To Video SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples