I am having trouble redirecting console output to a windows forms text box. The problem is thread related. I am running a console app in the following way,
priva
proc.WaitForExit();
It is called deadlock. Your main thread is blocked, waiting for the process to exit. That stops it from taking care of essential duties. Like keeping the UI updated. And making sure that Control.Invoke() requests are dispatched. That stops the AppendText() method from completing. Which stops the process for exiting. Which stops your UI thread from ever getting past the WaitForExit() call. "Deadly embrace", aka deadlock.
You cannot block your main thread. Use the Process.Exited event instead.