开发者

VB.NET - Timer Every Second Monitoring Windows Application Titles

I have a VB.NET desktop application that I'm using to monitor events in another windows application running on my system. I need to respond to certain events in a matter of seconds. One of the events I'm monitoring instantly changes the window title of a child window within the main process (I'm not changing it, the application I'm monitoring causes the change in it's own child window title). I have a function that uses windows API's to iterate through the title text of all the process's child windows, and I'm checking for certain values in the titles.

Is it a bad idea to be running this timer/title check once every second? Are there performance issues associated with running a timer in windows every second 24/7? Is it also bad for performance to be calling the API's which retrieve the titles of a开发者_运维百科ll the application's child windows? Could I eventually cause that application to crash by sending requests to it so often?

Thanks!


You will have to benchmark it to see, but if I recall correctly, iterating through every window has significant overhead.

Can't you simply monitor a single window? If you do that, you should be fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜