Is it possible to determine when the focus of the window changes at the system level? I am writing a time tracking application, and I would like to be able to listen to application switching (so that I can start the registration time in this application). I sat the Process class for a good hour here, and although I learned a lot of useful things, I did not find what I was looking for. I suspect that I will need to use hooks, but it is difficult to find clear documentation for this process, not to mention documentation specific to what I ask.
source
share