Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 c# 制作一个桌面应用程序,其中我必须防止计算机在某些情况下关闭。
Microsoft.VisualBasic.Interaction.Shell("shutdown -a", AppWinStyle.MinimizedFocus, false, -1);
此命令未在我的 Visual Studio 2012 中运行。尝试提供更好的解决方案。谢谢
试试这个:防止关机c#