捕获正在运行的进程的FlashWindowEx事件 [英] Capture FlashWindowEx event of a running process
本文介绍了捕获正在运行的进程的FlashWindowEx事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个已经在运行的应用程序-偶尔会触发FlashWindowEx事件(Windows 7图标闪烁).我想捕获此事件,但似乎找不到任何有关此操作的好信息.
I have an app that is already running - every now and then it triggers a FlashWindowEx event (the windows 7 icon flashes). I would like to capture this event but I can't seem to find any good info on how.
我的想法是这样:
- 使用Process.GetProcessesByName进入正在运行的进程
- 为FlashWindowEx设置事件处理程序
- 抓住它并做任何事情
我想我的问题是:
这可能吗?
- 是否可以从正在运行的进程中获取可用事件的列表?
- 我将如何连接FlashWindowEx?
推荐答案
WH_SHELL
钩子在窗口闪烁时通知您.根据文档:
The WH_SHELL
hook notifies you when a window is flashing. According to the documentation:
-
nCode
=HSHELL_REDRAW
-
wParam
=窗口的句柄 -
lParam
=TRUE
如果窗口闪烁,否则FALSE
.
nCode
=HSHELL_REDRAW
wParam
= the handle of the windowlParam
=TRUE
if the window is flashing,FALSE
otherwise.
这篇关于捕获正在运行的进程的FlashWindowEx事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文