I am creating a GUI application using Visual C# 2010 (.NET Framework 3.5). How to change this my code to the no stops responding?
for (int i = listBox1.Items.Count - 1; i >= 0; i--)
{
listBox1.SelectedIndex = i;
Process myProcess = new Process();
myProcess.StartInfo.FileName = "ffmpeg.exe";
myProcess.StartInfo.WorkingDirectory = "";
myProcess.StartInfo.Arguments = " -i \"" + listBox1.SelectedItem + "\" " + "-y ";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.Start();
myProcess.WaitForExit();
listBox1.Items.RemoveAt(i);
}
The convert program some time use the converting. How to show new form or messengebox the running application? I want it to respond the window. History for loop: How do I do I loop through items in a list box and then remove that item?