TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
david seinfeild
NA
20
5.6k
console output froozing app
May 23 2013 2:01 PM
im trying to get the console output to a textbox
but whenever i start the process it freeze my app till i have to crash it
heres my code so far
thingstohidewhenclosingsettings();
thingstoshowfornotebook();
Process myProcess2 = new Process();
myProcess2.StartInfo.FileName = @"C:\Windows\System32\cmd.exe";
myProcess2.StartInfo.UseShellExecute = false;
myProcess2.StartInfo.CreateNoWindow = true;
myProcess2.StartInfo.RedirectStandardInput = true;
myProcess2.StartInfo.RedirectStandardOutput = true;
myProcess2.Start();
StreamWriter myStreamWriter3 = myProcess2.StandardInput;
myStreamWriter3.WriteLine("netstat -n");
StreamReader myStreamWriter4 = myProcess2.StandardOutput;
string outputx = myProcess2.StandardOutput.ReadToEnd();
myProcess2.WaitForInputIdle();
int exitCode = myProcess2.ExitCode;
myProcess2.Close();
notebookbox.Text = outputx;
return;
Reply
Answers (
3
)
c# writing user input from form to text file using windows a
How to create nodes and display them in a picture box WFA