Processing global mouse and keyboard hooks in a secondary thread!
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I've read the following article: http://www.codeproject.com/csharp/globalhook.asp The code is working very well except for the problem the author mentioned: Question: I have a long delay when closing applications using hooks by clicking the x button in the titlebar. If I close the application via another event (button click) for example, that works fine. Answer: It's a know bug of Microsoft. It has to do with the Windows themes. If you disable the Windows themes, the problem goes away. Another choice is to have the hook code run in a secondary thread. Can anyone tell me how can I 'have the hook code run in a secondary thread'? I would really appreciate your help. Thanks.