Hello ,

I have a .exe file written in C++. i have used;

Process.Start("E:\\cmdf.exe");

to execute the code from C#.

Now i need to ;

(1) hide the command prompt

(2) Then to find a way to stop the command prompt (as in closing the application)

How do i do this.

try this:

ProcessStartInfo ps = new ProcessStartInfo("cmd.exe");
            ps.WindowStyle = ProcessWindowStyle.Hidden; //will hide the process

            Process p = Process.Start(ps);

            p.WaitForExit(); //wait for process to complete
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.