I\'m trying to create a hook to monitor the current position of the mouse cursor. Nothing important, I just need to count some pixels during interface design and wanted to l
You could use:
using System.Diagnostics; Process.GetCurrentProcess().Threads[0].Id
instead of
AppDomain.GetCurrentThreadId()
The problem is only to find the correct number of the thread if you have more threads than the main thread 0 running.