SHARE
TWEET

Untitled

a guest Jun 25th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Go()
  2.     Dim p As New Process
  3.     p.StartInfo.FileName = mainloc & "utserver.exe"
  4.     p.StartInfo.UseShellExecute = False
  5.     p.StartInfo.RedirectStandardOutput = True
  6.     AddHandler p.OutputDataReceived, AddressOf HelloMum
  7.     MsgBox(p.StartInfo.FileName.ToString)
  8.     p.Start()
  9.     p.BeginOutputReadLine()
  10. End Sub
  11.  
  12. Sub HelloMum(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
  13.     UpdateTextBox(e.Data)
  14. End Sub
  15. Private Delegate Sub UpdateTextBoxDelegate(ByVal Text As String)
  16. Private Sub UpdateTextBox(ByVal Tex As String)
  17.     If Me.InvokeRequired Then
  18.         Dim del As New UpdateTextBoxDelegate(AddressOf UpdateTextBox)
  19.         Dim args As Object() = {Tex}
  20.         Me.Invoke(del, args)
  21.     Else
  22.         RichTextBox1.Text &= Tex & Environment.NewLine
  23.     End If
  24. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top