如何在收到电子邮件时刷新桌面?

发布于 2024-08-22 04:17:11 字数 168 浏览 4 评论 0原文

我正在开发一个电子邮件客户端,我希望屏幕在收到邮件时短暂闪烁。我在 .NET 文档中搜索了我能找到的任何地方,但我发现实现它的唯一方法是使用 DirectX 函数,这当然是不可能的:我不希望我的用户仅为邮件客户端安装 DirectX :)

有没有仅使用 GDI 来做到这一点的方法吗?

谢谢

I'm developing a email client and I want the screen to flash briefly when I receive a mail. I searched anywhere I could in .NET documentation, but the only way I found to achieve it was to use DirectX functions which is of course impossible : I don't want my users to install DirectX only for a mail client :)

Is there a way to do this only with GDI ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

╭⌒浅淡时光〆 2024-08-29 04:17:11

幸运的是,应用程序无法做这种烦人的事情。您的程序应使用通知区域来通知用户事件和/或状态变化。

查看 WPF 通知区域 示例了解如何在 WPF 应用程序中使用它...

Fortunately, there is no way for an application to do this sort of annoying thing. Your program should use the notification area for notifying users of events and/or status changes.

Check out the WPF Notification Area example to see how you can use this in a WPF application...

維他命╮ 2024-08-29 04:17:11

Windows 中没有内置这样的功能是有充分理由的。显示大的闪烁矩形很容易诱发光敏性癫痫患者癫痫发作。

不要这样做。

There's a good reason functionality like this isn't built into Windows. Displaying large flashing rectangles is prone to induce seizures in people that suffer from photosensitive epilepsy.

Don't do this.

迷迭香的记忆 2024-08-29 04:17:11

我不确定您正在寻找哪种闪光效果,但您可以通过简要显示全屏半透明表单来实现这一点 - 请参阅 Opacity 属性。

I'm not sure exactly what kind of flash effect you're looking for, but you could achive this by briefly showing a full-screen semi-transparent form -- see the Opacity property.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文