i am doing a windows application program and these are the code inside

            System.Diagnostics.Process.Start("ConsoleApplication1.exe");
            Thread.Sleep(500);
            System.Diagnostics.Process.Start("ConsoleApplication2.exe");
            Thread.Sleep(500);
            System.Diagnostics.Process.Start("ConsoleApplication3.exe");

as if one of the console application program face error it will show in the cmd, so how would i going to capture those error in cmd and show in the message box as i dont want to show the cmd error message to users.

what will happen..
Regards

as everytime i execute this program and it will trigger and execute these 3 console application, so in this moment it will prompt out cmd for few seconds if successfule executing these console applications but my code in the console application, if anything goes wrong it will actually show in the cmd, so i would like to ask is there any methods to solve this problems instead of prompting out cmd error message, i would like the program to prompt message box for those errors. Thanks.

Redirecting the standard error output, and maybe enabling the CreateNoWindow property, both available through the ProcessStartInfo Class, should solve your problem.

Thank you, i will try 1st^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.