Hallöchen
Ich probier mommentan, den Text aus einer Batch datei auszulesen, und diese dann in eine Listbox auszugeben...
|
Visual Basic Quellcode
|
1
2
3
4
|
Dim Input As System.IO.StreamWriter
Dim Output As System.IO.StreamReader
Dim ErrorOutput As System.IO.StreamReader
Dim Anwendung As New Process()
|
Ab hier wirds Spannend... (Ich verwende nur 1nes gleichzeitig...)
|
Visual Basic Quellcode
|
1
2
3
4
5
6
7
|
Try
Output_ListBox.Items.Add(Output.ReadLine) ' Crasht ,sobald dass Lange Linien , oder mehrere miteinander kommen...
Output_ListBox.Items.Add(Output.ReadToEnd) 'Crasht ,sobald dass Lange Linien , oder mehrere miteinander kommen...
Output_ListBox.Items.Add(Output.Read) 'Kommen nur Zahlen...
Catch ex As Exception
End Try
|
|
Visual Basic Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With Anwendung.StartInfo
.FileName = "server.bat"
.CreateNoWindow = True
.RedirectStandardInput = True
.RedirectStandardOutput = True
.RedirectStandardError = True
.UseShellExecute = False
End With
Anwendung.Start()
Input = Anwendung.StandardInput
Input.AutoFlush = True
Output = Anwendung.StandardOutput
ErrorOutput = Anwendung.StandardError
End Sub
|
Ich hab echt nicht die geringste ahnung, warum dieser Sche*** immer crasht...
Weis da eventuell, wo der Fehler hängt.?
Ach ja, die Batch startet Minecraft_server.jar