捕捉正在运行的进程的FlashWindowEx事件(C#) [英] Capture FlashWindowEx event of a Running Process (C#)

查看:188
本文介绍了捕捉正在运行的进程的FlashWindowEx事件(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已经运行的应用程序 - 每一个现在,然后触发一个事件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.

我的想法是,它会是这样的:

My thoughts were that it would go like this:


  • 勾成使用Process.GetProcessesByName运行的进程

  • 为FlashWindowEx设置事件处理程序

  • 抓住它,做任何

我想我的问题是:

这可能吗?


  1. 是否有一种方式来获得从正在运行的
    过程可用事件的列表?

  2. 我怎么会勾到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 window
  • lParam = TRUE if the window is flashing, FALSE otherwise.

这篇关于捕捉正在运行的进程的FlashWindowEx事件(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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