在c#中使用Windows 10关机消息

问题描述 投票:0回答:1

有没有办法以我自己的方式使用Windows 10上执行

shutdown.exe -c "something"
时显示的消息?

Windows 10内置的消息窗口:

我想要做的是使用这种类型的内置消息并从我的 C# 应用程序调用它,其中包含我想要编辑标题和描述文本的其他信息。这有可能吗?

编辑:

澄清一下:我不想关闭系统。我只想将该消息用于其他目的,根本不关机!

c# windows windows-10
1个回答
0
投票

我已经构建了一个您可以使用的迷你库,请参阅 github 存储库

弹出窗口示例

这样称呼它

using SmartScreenMessagePopupDialog;

SmartScreenMessageDialog customWindow = new SmartScreenMessageDialog("Welcome", "Hi there, this is an example", true);
customWindow.Show();
© www.soinside.com 2019 - 2024. All rights reserved.