bulltorious
bulltorious

Reputation: 7897

Hide controlbox on Process.Start() cmd window

I am using process.Start(); to start a batch file. The CMD windows appears fine and works perfectly. How can I disable the controlbox (minimize, maximize, close) on the upper right of the cmd window progmatically. I wish for the CMD window to be displayed, but prevent the user from closing it using the X button.

Thanks!

Upvotes: 3

Views: 1676

Answers (1)

manji
manji

Reputation: 47978

Look here:How to disable the Close button on the title bar of a console application...

It applies to any console (even the one opened with process.Start();).It's complicated but I think it's the only method available.

Upvotes: 2

Related Questions