Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 319
bulltorious Avatar asked Apr 20 '26 12:04

bulltorious


1 Answers

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.

like image 78
manji Avatar answered Apr 23 '26 03:04

manji



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!