2 years ago

#76447

test-img

marek9911

How to get output from node server in winforms

I'm trying to get output from node server into a multiline textbox but every time I launch my application, the WinForms window do not open until I close the node process from task manager.

Here is the code:

private void Form1_Load(object sender, EventArgs e)
        {
            var processStartInfo = new ProcessStartInfo
            {
                FileName = "node",
                Arguments = "src",
                RedirectStandardOutput = true,
                UseShellExecute = false,
                CreateNoWindow = true
            };
            var process = Process.Start(processStartInfo);
            var output = process.StandardOutput.ReadToEnd();
            process.WaitForExit();
            materialMultiLineTextBox1.Text = output;
        }

c#

winforms

0 Answers

Your Answer

Accepted video resources