Automatically attaching a screenshot to an email

Alc

Registered User.
Local time
Today, 17:52
Joined
Mar 23, 2007
Messages
2,421
I'm trying to idiot proof my application. I've just found out that certain people here have been encountering errors and not mentioning them to me, until such time as they are on a deadline and I get called upon to instantly fix things.

I've built in error handling and would like to include the automatic sending of an email to myself, notifying me of the fact that a problem has occurred.

The email itself is not a problem, but does anyone know of a way to simulate the <alt> + <print> functionality and automate attaching a screenshot of error message to the email?

Thanks in advance for any suggestions.
 
An excellent code sample that captures the screen and saves it to a Bitmap file can be found here:

http://www.visualbasic.happycodings.com/Graphics_Games_Programming/code12.html

Bear in mind that if you choose to attach such files to an email, an uncompressed bitmap file of a 1024x768 screen capture is over 2 MB. A better bet would be to program your error trap to email you with the Error Number, Description and the Sub or Function in which the error occurs.
 
Thanks for that, I'll take a look at it.

I'll probably go with the error message option you mentioned (that's what i started out doing) but I wanted to see if it was at least possible the alternative way.
 

Users who are viewing this thread

Back
Top Bottom