简体   繁体   English

在Process.Start()cmd窗口中隐藏控制框

[英]Hide controlbox on Process.Start() cmd window

I am using process.Start(); 我正在使用process.Start(); to start a batch file. 启动批处理文件。 The CMD windows appears fine and works perfectly. CMD窗口看起来很好并且工作正常。 How can I disable the controlbox (minimize, maximize, close) on the upper right of the cmd window progmatically. 如何逐步禁用cmd窗口右上角的控件框(最小化,最大化,关闭)。 I wish for the CMD window to be displayed, but prevent the user from closing it using the X button. 我希望显示CMD窗口,但阻止用户使用X按钮关闭它。

Thanks! 谢谢!

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. 它适用于任何控制台(甚至是使用process.Start();打开的控制台process.Start(); )它很复杂,但我认为它是唯一可用的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM