views:

183

answers:

1

Possible Duplicate:
How can I prevent users from taking screenshots of my application window?

So far I have be able to stop the Prt Sc key press and able to clear the clipboard so that my application cannot be screen grab.

However as a test I tried used Corel PaintShop pro and an option it has is to import screen capture which is very different from screen grabbing using the clipboard and as I suspected my application did not stop this.

So I have found the following code at this site : http://www.bitwisemag.com/copy/delphi/delphi1.html

This uses a different way of grabbing what is on screen and I presume that Corels method is similar to this. Is there anyway of this method of screen grabbing from being used on my application.

Cheers

Tim

Greg Hewgill - Cheers for this - I will read this post

to get a screenshot on Windows is trivial, eg GetWindowDC(NULL). The only way I can think of is similar to this answer: stackoverflow.com/questions/455623/… – Nick

Nick looks like the same post that Greg has mentioned - however cheers for your response

Why go to this trouble? People nowadays can simply take a photo with their phone and send that around? – Marjan Venema

That may be true Marjan but I am trying to stop spyware programs from click logging if that makes the matter clearer.

A: 

The only way I can think of is to use DirectX. When certain apps such as DVD players write to the screen using DirectX, Windows sees a black (not quite black, but close) rectangle where the video shows. Attemps to use PrintScr or GetWindowDC() return that black rectangle. High-end screen capture apps like Snag-It can use DirectX to render the image properly, but this would be a 99% solution for you, and as others have said, users can always take a photo anyway.

Chris Thornton
...or connect the VGA/DVI output to a recording device.
Andreas Rejbrand
@Andreas - Ha! Easily thwarted by flagging the content with HDCP. No, wait, probably NOT easy! But since we're already into overkill territory here, why not?
Chris Thornton
Okay I am getting really lost in all of this, as I mentioned I have been able to prevent the PrintScreen from screen grabbing my applications. Is there no way of listening for the GetWindowDC call and intercept this ? or is it possible to hide the window handle of the application? I may need some code examples of what I need to do with this as I feel it is going beyond my skills of Delphi :)
TimCS
accessing DirectDraw surface is not that trivial, however not much harder, really