开发者

How can I tell if another process has the active foreground window? (Win32 API vb.net)

The user32.dll provides functions to get the process id from a process executable name, and I can also obtain the active or foreground window that the user i开发者_JAVA技巧s working.

Can I determine what windows the targeted process has opened? Otherwise, can I find out what details about the process that opened the foreground/active window?

My code needs to run only when another specific process is running and the user is actively using that window, while that window is the active, foreground, and currently focused window on the desktop.


I think you want to use GetWindowThreadProcessId or possibly EnumThreadWindows

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜