Hi there, I have a Timer that monitors certain conditions (like if a Process is running) and when those conditions are met I must create a hook (SetWinEventHook). The problem is that the hook must be created on the main thread, otherwise my callback doesn't return.
How to do that? I've tried everything, and the only way that this worked, was using a System.Windows.Forms.Timer, but I don't want the my monitoring timer running in the same thread as my application, so I want to use Timers.Timer or Threading.Timer.
Luiz Borges
PS: It is a GUI-less app (notify icon only).