An application I'm writing needs to send a message to another application to make the cursor visible. The vast majority of my experience in programming is in C#, and I've managed to write a DLL Injector that allows me to inject managed code using CreateRemoteThread. Inside the DLL I'm injecting is a P/Invoked call to ShowCursor. This seems to have no effect however, and using a StreamWriter to check the value of what ShowCursor returns shows that while the function is successful and the display counter increments, at some other point the counter returns to 0. (Which should be displaying the cursor anyway, now that I think about it.)
What important piece of information am I missing? Do Windows Forms have some functionality that prevents me from changing the cursor like this? Is ShowCursor tied to the thread it's running in, so it reverts upon completion? Or is it something completely different?