Hi all,

I am using Visual Studio 2010, VB to compile my program. My program include having to open a command prompt and writing a command to it. and display the output/errors in a textbox. But i can't seems to make it display it in a textbox and it opens ALOT of command prompts windows. Any help would be greatly appreaciated! Below is the my code:

Code:
 
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
        Try
            Dim P As New Process
            With P
                .StartInfo.FileName = "cmd.exe"
                .StartInfo.RedirectStandardOutput = True
                .StartInfo.UseShellExecute = False
                .Start()
                SendKeys.Send("julian.exe. -input mic -C julian.jconf" & "{enter}")
                Output.Text &= .StandardOutput.ReadToEnd()
                .WaitForExit()
            End With
        Catch ex As Exception
        End Try
    End Sub