Adding CMD Prompt to Windows Forms

FA2A

New member
Joined
Feb 4, 2007
Messages
2
Programming Experience
Beginner
I tried to search the forum for my answer before I posted but I couldn't find anything that helped me out.

My Issue is I would like to add the Windows command prompt to a Windows form, exactly how you can add a browser to a form I would like to do that with the CMD prompt. The user will be able to use the GUI to input the data she uses, or do it directly from the CMD prompt within the program, because its a tabbed enviornment I though its something I should add because I think its not worth even having a tabbed application if you have to open the CMD prompt in another window to do different things.
 

Attachments

  • consoleform.jpg
    consoleform.jpg
    48.6 KB · Views: 90
Thank you so much, it was becomming a pain to search anything with VB, or Visual Studio and command prompt w/o finding hundreds to thousands of pages regarding programming from the CMD Prompt, thanks so much
 
I usually can get a grasp of whats going on so but I think I'm a little lost on this.

I have a button with this code.
VB.NET:
Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click
        Dim myProcess As New Process()
        Dim myProcessStartInfo As New ProcessStartInfo("start.exe")
        myProcessStartInfo.UseShellExecute = False
        myProcessStartInfo.RedirectStandardOutput = True
        myProcess.StartInfo = myProcessStartInfo
        myProcess.Start()

        Dim myStreamReader As IO.StreamReader = myProcess.StandardOutput
        ' Read the standard output of the spawned process.
        Dim myString As String = myStreamReader.ReadLine()
        Console.WriteLine(myString)

        myProcess.Close()

Now I understand it starts start.exe and it reads whatever the output puts out to myString. I'm wondering what happens next? Do I set up a text box and send the text there? if so how would I go about doing this? I took a year of visual basic .net and the teacher kind of just sat around and I'm not really used to object oriented programming.
 
Back
Top