如何在收到电子邮件时刷新桌面?
我正在开发一个电子邮件客户端,我希望屏幕在收到邮件时短暂闪烁。我在 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
幸运的是,应用程序无法做这种烦人的事情。您的程序应使用通知区域来通知用户事件和/或状态变化。
查看 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...
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.
我不确定您正在寻找哪种闪光效果,但您可以通过简要显示全屏半透明表单来实现这一点 - 请参阅
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.