在QQ中有一个消息提醒的功能,就是当你用“聊天模式”和朋友聊天的时候,而且该窗体没有处于活动状态,如果对方给你发送一条消息,那么这个窗体在任务栏就变成了蓝色,而且在闪烁,这样就有便于提醒你查看对方的消息,其实在C#中也可以实现此功能。
具体方法如下:
首先声明API函数 FlashWindow
[System.Runtime.InteropServices.DllImport("user32")]
private static extern long FlashWindow(long hwnd, long bInvert);
hwnd 为需要提醒的窗口句柄,bInvert 非零表示切换窗口标题;零返回最初状态
在需要提醒的时候调用方法如下:
FlashWindow(this.Handle.ToInt64(),0);
相关文章:
-
2021-07-22
-
2021-10-19
-
2021-10-16
-
2021-11-27
-
2021-04-28
-
2021-11-27
-
2021-09-03
-
2021-11-13
猜你喜欢
-
2021-09-16
-
2021-08-15
-
2022-01-19
-
2021-09-25
-
2021-11-13
-
2022-01-07
-
2021-11-09
-
2021-12-20
相关资源
-
下载
2022-11-30
-
下载
2021-06-27
-
下载
2022-12-20
-
下载
2021-06-27