Piping output of a process into a Rich Text Box

mattarnster

New member
Joined
Jul 6, 2011
Messages
2
Programming Experience
1-3
Hi all,
I am making a server front-end for Minecraft and I have only got this far:
VB.NET:
Public Class Main    Dim minecraftServer As Process
    Private Sub btn_start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_start.Click
        Dim psi As New ProcessStartInfo("C:\Program Files\Java\jre7\bin\javaw.exe", "-classpath C:\minecraft_server.jar net.minecraft.server.MinecraftServer nogui")
        psi.UseShellExecute = False
        'psi.CreateNoWindow = true;
        psi.RedirectStandardError = True
        psi.RedirectStandardInput = True
        psi.RedirectStandardOutput = True
        minecraftServer = New Process()
        minecraftServer.StartInfo = psi


        minecraftServer.EnableRaisingEvents = True


        minecraftServer.Start()


        minecraftServer.BeginOutputReadLine()
        minecraftServer.BeginErrorReadLine()
    End Sub
End Class

This will start the process, but I am unsure as to how to get the output of the process into a rich text box.
If anyone can help I would be very greatful. Thanks.
 
Back
Top