?
Solved

Possible to detect screen scrape / screen capture?

Posted on 2005-04-22
8
Medium Priority
?
1,524 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:WuLabs
  • 4
  • 3
8 Comments
 
LVL 25

Accepted Solution

by:
InteractiveMind earned 250 total points
ID: 13844729
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
 

Author Comment

by:WuLabs
ID: 13844799
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
 

Author Comment

by:WuLabs
ID: 13844832
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Expert Comment

by:InteractiveMind
ID: 13844953
> 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
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 13844980
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
 

Author Comment

by:WuLabs
ID: 13845220
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
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 13845870
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
 
LVL 10

Expert Comment

by:NetworkArchitek
ID: 13847762
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Six Sigma Control Plans

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question