0

I'm writing a screen shot app where I need to prevent the mouse over effect in all windows. For example, when hovering over a button or hyperlink they will often change color as a form of feedback. My goal is to take a screen shot where the user clicks without the additional feedback.

I can see two approaches:

  1. Disable / ignore the system cursor and create my own. Allow it to fly around the screen without triggering any hover effects. Send a mouse_event when the user clicks using winuser.h
  2. Use a semi-transparent topmost WPF window that allows clicks pass through to other windows. THis answer feels close, but does trigger hover over effects in other windows.

Option 1 is feasible, but I would need to also account for right clicking and scroll wheel.

Option 2 would be best if I could pass through the click event and not the mouse movement. Is this possible in WPF or should I roll my own cursor controls?

Thanks!

Chris
  • 387
  • 5
  • 16
  • Capture the mouse and take the screenshot when you lose capture? – Jeremy Lakeman Apr 08 '21 at 04:39
  • How can they be clicking a button at the same time as taking a screen shot? If you mean that there a visual things happening while the screen shot is being taken then your second option is better. Click your app to start screen shot > overlay clear but accepts mouse events window > take screen shot. – darbid Apr 10 '21 at 11:20

0 Answers0