Dim active As Boolean = True While active If active = True Then Process.Start("cmd.exe", "/k ffmpeg -i " & FileName2 & " -c:v libx264 " & "Down\" & FileName1 & ".mp4") 'create file inside the folder active = False Else MsgBox("Finish") End If End While
Function DoTest() As Integer Dim p As System.Diagnostics.Process p = System.Diagnostics.Process.Start("cmd.exe", <your command parameters>) While p.HasExited = False System.Threading.Thread.Sleep(500) End While End Function
p
HasExited
While (Not p.HasExited) Thread.Sleep(500) End While Timer1.Stop() MsgBox("Whatever...")
Private Function ConvertAndTime(sourceFilename As String, destinationFilename As String) As Integer Dim process As Process Dim sw As New StopWatch sw.Start process = Process.Start("cmd", "/c ffmpeg.exe -i " & sourceFilename & " -c:v libs264 Down\" & destinationFilename & ".mp4") process.WaitForExit sw.Stop return sw.ElapsedMilliseconds End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)