Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Go()
- Dim p As New Process
- p.StartInfo.FileName = mainloc & "utserver.exe"
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- AddHandler p.OutputDataReceived, AddressOf HelloMum
- MsgBox(p.StartInfo.FileName.ToString)
- p.Start()
- p.BeginOutputReadLine()
- End Sub
- Sub HelloMum(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
- UpdateTextBox(e.Data)
- End Sub
- Private Delegate Sub UpdateTextBoxDelegate(ByVal Text As String)
- Private Sub UpdateTextBox(ByVal Tex As String)
- If Me.InvokeRequired Then
- Dim del As New UpdateTextBoxDelegate(AddressOf UpdateTextBox)
- Dim args As Object() = {Tex}
- Me.Invoke(del, args)
- Else
- RichTextBox1.Text &= Tex & Environment.NewLine
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement