请教关于process打开控制台程序锁死的问题
各位高手大家好,小弟vb.net新手,现在要在VS2003环境下编译一个程式,用VB控制一个用C++写的控制台程序,代码如下:
Dim a As Process = New Process
Dim b As ProcessStartInfo = New ProcessStartInfo
b.FileName = "test.exe"
b.RedirectStandardInput = True
b.RedirectStandardOutput = True
b.RedirectStandardError = True
b.WindowStyle = ProcessWindowStyle.Hidden
b.UseShellExecute = False
b.CreateNoWindow = True
a.StartInfo = b
a.Start()
System.Threading.Thread.Sleep(1000)
m = a.StandardOutput.ReadLine
TextBox1.Text = m