相关疑难解决方法(0)

检测前景窗口何时更改

我知道哪个使用GetForegroundWindow函数我可以获得当前活动窗口句柄,但现在i want to detect when the active window (of any application) changes (become active).我想到的第一个解决方案是

  1. 存储GetForegroundWindow函数返回的当前值(句柄).
  2. 使用计时器组件再次检查GetForegroundWindow返回的值并与旧值进行比较.

我想知道是否存在更好的方法来执行此操作可能使用Windows消息或其他东西.

delphi winapi

7
推荐指数
1
解决办法
2334
查看次数

标签 统计

delphi ×1

winapi ×1