views:

25

answers:

1

I am writing a WPF application that allows the user to draw over the entire screen when the right mouse button is held down. I use a full screen transparent overlay form to achieve this, however, as I draw lines with the mouse, what's happening is that the portion of my window that contains the line is becoming visible (as expected). The undesired effect of this is that if the line is over a part of another application such as a textbox, or hyperlink, this changes the cursor back to the default cursor of my app (arrow), instead of the other applications desired cursor (IBeam). I want my overlay to be seamless to the user, and just show their drawing path, rather than have any interaction with the mouse cursor.

See my example below:

alt text

+1  A: 

See this thread for a solution however this will probably conflict with how you are capturing the mouse events. You could try a mouse hook or try passsing the input to the window underneath instead. You may want to expand your search to win32, wndproc etc. Also returning HTTRANSPARENT from WM_NCHITTEST doesn't work in this case.

Kris
The first link you sent me was exactly what I was looking for. I am using a global mouse hook, so I don't need to rely on the form events. Thank you very much!!
Dylan Vester