BP Forums
How to make a GUI for a console/cmd application - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9)
+----- Thread: How to make a GUI for a console/cmd application (/showthread.php?tid=684)



How to make a GUI for a console/cmd application - Cartman - 10-26-2012

Hi guy im stuck <!-- sSad --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="Sad" title="Sad" /><!-- sSad -->

Ive become obsessed with console/cmd application that you run from the command prompt with parameters like wget, ffmpeg, rtmpdump etc.....

So i tried researching how to make a frontend GUI for such applications and this is where i have hit a brick wall.

For example one such console app i would like to make a nice GUI for ffplay(media player) which is part of the ffmpeg package and you run it from a command prompt like this.....
Code:
ffplay [options] [‘input_file’]
Working example.....
Code:
ffplay -i http://wpc.573d.edgecastcdn.net:80/00573D/live/enc0001/a-bbc1/m3u8/a-bbc1-1.m3u8

Any idea how i could make a simple GUI for ffplay ?

So far i have.....
Code:
Imports System.ComponentModel

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myProcess As New Process()
        myProcess.StartInfo.UseShellExecute = False
        myProcess.StartInfo.RedirectStandardOutput = True
        Try
            myProcess.StartInfo.FileName = "ffplay"
            myProcess.StartInfo.Arguments = TextBox2.Text
            myProcess.StartInfo.CreateNoWindow = True
            myProcess.Start()
            TextBox1.Text = _
               Replace(myProcess.StandardOutput.ReadToEnd(), _
               Chr(13) & Chr(13), Chr(13))
            myProcess.WaitForExit()
        Catch ex As Win32Exception
            MsgBox((ex.Message + ". Error Detected."))
        End Try
    End Sub

End Class

This only works with certain parameters like......
Code:
--help
but try and run a video it wont work ?

<!-- sSad --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="Sad" title="Sad" /><!-- sSad -->


Re: How to make a GUI for a console/cmd application - brandonio21 - 10-30-2012

I tried to do something like this a long time ago, but I also had difficulty with it. Unfortunately, I don't know what to tell you! I have never worked with "ffplay" either, so I don't know if there are any limitations or something of that sort. Have you made any progress since this post?


Re: How to make a GUI for a console/cmd application - brandonio21 - 10-30-2012

I tried to do something like this a long time ago, but I also had difficulty with it. Unfortunately, I don't know what to tell you! I have never worked with "ffplay" either, so I don't know if there are any limitations or something of that sort. Have you made any progress since this post?