My application has several panels covering the application. So another user pointed out to me kindly that since every control has its own WndProc
, the WM_SETCURSOR
method wasn't being passed on to the form underneath it. In order to receive those messages, I would have to override each of those panels with its own WndProc
method.
However the above code does work if there are no controls covering the form where the cursor is.