views:

108

answers:

4

I have a bit of a challenge.

In an earlier version of our product, we had an error message window (last resort, unhandled exception) that showed the exception message, type, stack trace + various bits and pieces of information.

This window was printscreen-friendly, in that if the user simply did a printscreen-capture, and emailed us the screenshot, we had almost everything we needed to start diagnosing the problem.

However, the form was deemed too technical and "scary" for normal users, so it was toned down to a more friendly one, still showing the error message, but not the stack trace and some of the more gory details that I'd still like to get. In addition, the form was added the capabilities of emailing us a text file containing everything we had before + lots of other technical details as well, basically everything we need.

However, users still use PrintScreen to capture the contents of the form and email that back to us, which means I now have a less than optimal amount of information to go on.

So I was wondering. Would it be possible for me to pre-render a bitmap the same size as my form, with everything I need on it, detect that PrintScreen was hit and quickly swap out the form contents with my bitmap before capture, and then back again afterwards?

And before you say "just educate the users", yes, that's not going to work. These are not out users, they're users at our customers place, so we really cannot tell them to wisen up all that much.

Or, barring this, is there a way for me to detect PrintScreen, tell Windows to ignore it, and instead react to it, by dumping the aformentioned prerendered bitmap onto the clipboard ready for placing into an email?

The code is C# 3.0 in .NET 3.5, if it matters, but pointers for something to look at/for is good enough.

Our error-reporting window has these capabilities:

  • Show a screenshot that was taken when the error occured (contains all the open windows of the program at the time, before the error dialog was shown)
  • Show a text file containing every gory detail we can think of (but no sensitive stuff)
  • Save the above two files to disk, for latter attaching to an email or whatnot by the user
  • Sending the above two files to us by email, either by opening a new support case, or entering an existing support case number to add more information to it
  • Ignore the problem and hope it goes away (return to app)
  • Exit the application (last resort)

We still get screenshots from some users. Not all, mind you, so my question is basically how I can make the PrintScreen button help us a bit more for those users that still use it.

+1  A: 

What about offering them a "Print Screen" button that performs these actions as well as performing the print screen? If you're locked into this method of having your customers send error details, this may be an easier route to take.

Lifted from my comment below for easier reference (looks helpful, perhaps):

codeproject.com/KB/cs/PrintScreen.aspx

BradBrening
We have that as well. The PrintScreen action is ingrained in their fingers seemingly. The form has the ability to copy out both a screenshot of their application (all the open windows), a detailed text file, save these two to disk, send them to us by email, or show them to the user for copying or viewing. Still, we get screenshots.
Lasse V. Karlsen
Mind you, I'm not looking at using PrintScreen as our main reporting tool here, I'm just trying to manage the few users that still use that method for reporting problems.
Lasse V. Karlsen
Is this article of any help? http://www.codeproject.com/KB/cs/PrintScreen.aspx
BradBrening
How many users are we talking about? It's an interesting problem, but I'm not sure the ROI is there for a few stubborn users, versus just kicking out the bug report as "need more info (use the right error reporting button)".
Michael Petrotta
I understand where you're coming from. We get strange user behavior that we have to support as well.
BradBrening
I don't know if ROI is good enough either, I'm looking for options here at the moment. It's not all that many users, but some problems we've had in the past in our app can be tricky to reproduce, so asking the user for more information a day later is almost the same as "sorry, case closed, cannot reproduce" for those bugs.
Lasse V. Karlsen
@Brad, that links looks mighty promising.
Lasse V. Karlsen
+1  A: 

Wouldn't it be possible to disable the Print Screen button altogether when the error popup is active? Have it display a message along the lines of "Please use the clearly visible button in the middle of your screen to report the error" I agree it breaks expected functionality, but if your users are really that stupid, what can you do...

Alternatively, have it report errors automatically (or store the data locally, to be fetched later, if you can't send without asking for some reason), without asking the user. If you want to be able to connect print screened screenshots with detailed error data, have it send a unique ID with the data that's also displayed in the corner of the popup.

Matti Virkkunen
Unfortunately sending information in the background in any way is strictly prohibited by most of our customers. This is software used by medical staff at hospitals, so there's security limitations up the wazoo regarding outside connections. I'm left with giving the user the information necessary to send via his/her normal email client.
Lasse V. Karlsen
+1  A: 

One option: Put the stack trace and other scary stuff into the error screen using small, low-contrast type -- e.g. dark gray on light gray -- so that the user doesn't really even see it, but the Print Screen captures it.

But if you want to detect the PrintScreen and do your own thing, this looks like an example of what you want.

JacobM
+1  A: 

This is in theory...the best way to deal with it I would think

  • Intercept a WM_PRINT message or inject one into your process... see this article here
  • Install a system-wide keyboard hook and intercept the print-screen key and swap it around with your contents prior to the capture. Now, I can point you to several places for this, here on CodeProject, and here also, keyboard spy, and finally, global Mouse and keyboard hook on CodeProject.

Now, once you intercept the print screen, invoke the WM_PRINT message by capturing the contents that you want to capture.

I know this is brief and short, but I hope this should get you going.

tommieb75