protect my picture
-
for example i have a small programm with a picture inside. can i protect this picture form making screen shot by pressing screen shot key( but its not so imporant) can i catch an event if some other program prepars to make a screen shot? ist it possible to protect my picture?:confused: thanks in advance!
-
for example i have a small programm with a picture inside. can i protect this picture form making screen shot by pressing screen shot key( but its not so imporant) can i catch an event if some other program prepars to make a screen shot? ist it possible to protect my picture?:confused: thanks in advance!
No, not unless you write directly to the screen buffer (write directly to the graphics device instead going through GDI or GDI+). .NET is too high-level for this, and you'd would have to do a lot of work to make it happen (involves difficult work using the Windows DDK, or device driver kit), and you really have to understand device drivers the Hardware Abstraction Layer (HAL). A better way, perhaps, is to use Managed DirectX, which you can download at http://msdn.microsoft.com/directx[^]. Using the right options with DirectDraw, you can right directly to the screen buffer and taking screenshots - which uses GDI to bitblt the desktop or a particular window - won't see it. This is currently what Windows Media Player (along with some other media players) do to prevent you from taking screenshots of a video (unless you're using a program that rips a frame directly from the decoded bits). If you want to read a good book on Managed DirectX, read Managed DirectX 9 Kick Start : Graphics and Game Programming[^]. To note, Managed DirectX requires the DirectX runtime to be installed, as well as the Managed DirectX libraries. You can read more about this in the Managed DirectX SDK (which is what you'd download from the link above), as well as the deployment documents you can also find from that link. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]