检测当前Windows程序是否被激活

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
Tapplication类有一个属性--Active,这个属性就可以描述当前运行的程序是否被激活,成为Windows的焦点。检测的代码如下:
If Application.Active=False then
ShowMessage(’当前窗口没有被激活’);
 
顶部