Possible to detect screen scrape / screen capture?

Hi

I have a 3rd party program which captures my screen every now and then.  

I would like to know when it captures the screen.

Is it possible to detect when the 3rd party program "screen captures" or "screen scrapes"?

If so, how would I write a program to detect it?
WuLabsAsked:
Who is Participating?
 
InteractiveMindCommented:
It depends on the methodology used to capture the screen. In most cases however, yes, you can figure this out.

If you're using C/C++, then there's probably an existing Hook, which will allow you to trace screen captures. However, I developed a Java application some time ago, which done this. The way it worked, was to get the Image from the clipboard every # seconds. It would then compare the image from the clipboard, to the previous one; if they're boht the same, then no change has been made, and obviously, if they're different, then the screen capture has occured.

I hope that gives you some ideas -- but I'm sure that you'll get even more assistance if you specify the language which you wish to use for this.

Kind Regards;
0
 
WuLabsAuthor Commented:
I was going to write my program in C# or C++.

I'm assuming the 3rd party program was also written in C# or C++ (its not slow enough to be java!).

Besides comparing screen shots, what other things can I do?  Because screenshotting every XXX time might take a lot of resources
0
 
WuLabsAuthor Commented:
Also,

Just curious,

Is the screen capture clipboard the same clipboard as "print screen"?  i.e. when I press the print screen button it captures a desktop image

If it isn't the same, how do I get access to the right clipboard?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
InteractiveMindCommented:
> I was going to write my program in C# or C++.
I would choose C# over C++ personally; it's just a much easier language (in my opinion).

> I'm assuming the 3rd party program was also written in C# or C++ (its not slow enough to be java!).
lol :-P Yeah, very probably.

> Besides comparing screen shots, what other things can I do?  Because screenshotting every XXX time might take a lot of resources
Well, as I've said, if you're any good at C++, then you may be able to find a Hook, in the MSDN, for this, otherwise, my suggestion would be the easiest, and if you code it perfectly, then it will also be considerably efficient! :-)

> Is the screen capture clipboard the same clipboard as "print screen"?  i.e. when I press the print screen button it captures a desktop image
Yes, it is.
0
 
InteractiveMindCommented:
Oh, sorry.. I just thought: the application probably doesn't add the image to the clipboard.. you'll need to quickly find out, before pursuing. Open a photoshop program (e.g. Adobe PhotoShop, or just Paint), then try and paste into the application.... if it shows a screenshot, which you didn't take, then this is a good thing, otherwise, let me know.
0
 
WuLabsAuthor Commented:
Doesn't seem like the 3rd party program is putting the screen shot into the clipboard.  I was reading around here, seems like a way to do it is to get the handle to the window (desktop in this case), and just write the contents of that drawing to an image buffer via bitblt.

If this is the case, can I hook into this, or do something else?

0
 
InteractiveMindCommented:
Sorry about the delay -- being a teenager, it's the law that I go and watch "Top of the Pops"  :-P

I don't know if there's actually anyway that you can do this...

> get the handle to the window (desktop in this case), and just write the contents of that drawing to an image buffer via bitblt
That would take a screenshot, won't it?

What application is it that you're trying to figure out when it creates a screen shot? What does it actually do?
0
 
NetworkArchitekCommented:
Well I've never tried to do somethinig like this but I would suggest you try to figure out the program works. Figure out if it writes the image to the clipboard as InteractiveMind suggested, or if it puts it into a file. You may be able to run some sort of spy application the program and see what DLL's and so forth it calls. Does the program cause any system events to be fired when it captures the screen. A heuristic would be like to see how much the CPU processor usage for that app jumps when it captures the screen and maybe you can subscribe to that event, and then denote that captured the screen if the usage jumped X percent. If it writes its image to a file you can do a filewatcher. Well, I was just trying to give some general strategies as again I have never attempted this kind of thing.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.