从 Win32 或 C# API 获取 Windows 安静时间 [英] Get windows Quiet hours from Win32 or C# API

查看:35
本文介绍了从 Win32 或 C# API 获取 Windows 安静时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 从 Windows 版本 8 开始引入了安静时间"或请勿打扰"功能.使用此功能,您可以在任务栏通知区域的配置时间内禁用通知弹出窗口.

Windows introduced "Quiet Hours" OR "Do not disturb" feature from Windows version 8 onward. Using this feature, one can disable notifications popups for configured amount of time from task bar notification area.

我正在尝试使用 C++ 或 C# 应用程序获取当前操作系统、安静时间,但尚未找到任何 API 或事件.

I am trying to get current OS, Quiet hours within C++ or from C# application but haven't found any API or Event.

有人可以帮助解决我的问题吗?

Can anybody help on this to resolve my issue?

推荐答案

自从 最近对 Windows 10 的重大更新,安静时间"已更改为焦点辅助" - 它的工作方式似乎有所不同,因此以前的答案不再适用.

Since a recent major update to Windows 10, "Quiet Hours" has changed to "Focus Assist" - and it seems to work differently, so previous answers don't apply any more.

到目前为止,我能找到的唯一解决方案是此处提供的解决方案.

The only solution I could find for this so far, is the one offered here.

这篇关于从 Win32 或 C# API 获取 Windows 安静时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆