Nevermind all i had to do is make the following changes
Code:
Private Sub DisplayOutput(ByVal sendingProcess As Object, ByVal output As DataReceivedEventArgs)
OutText.AppendText(output.Data() & vbCrLf)
End Sub
Public Function ziload(ByVal para As String)
If (My.Computer.FileSystem.FileExists("ziphone.exe")) Then
'CHANGE HERE
P = New Process()
'CHANGE HERE
With P
AddHandler P.OutputDataReceived, AddressOf DisplayOutput
.StartInfo.CreateNoWindow() = True
.StartInfo.UseShellExecute = False
.StartInfo.RedirectStandardInput = False
.StartInfo.RedirectStandardOutput = True
.StartInfo.FileName = "ziphone.exe"
.StartInfo.Arguments = para
.SynchronizingObject = OutText
End With
P.Start()
disabler()
P.BeginOutputReadLine()
P.EnableRaisingEvents = True
Else
MsgBox("File """ & "ziphone.exe" & """ does not exist !", MsgBoxStyle.Exclamation, "File not found")
enabler()
End If
End Function
Public Function closer()
P.CancelOutputRead()
P.Kill()
OutText.AppendText(vbNewLine)
enabler()
End Function