Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET/ActiveX/Silverlight Screen Capture

I need a way to capture the screen within a web application in any way possible. Is there such a way without installing other tools like SnagIt? Can I use Win32 DllImports within an ActiveX component and do it that way?

Thanks in advance!

like image 683
Benny Avatar asked Jun 01 '26 01:06

Benny


1 Answers

With pure Silverlight code, both in browser and out of browser, it's not possible to capture an image of the screen (thankfully! That would be a huge privacy and security issue if a rogue website could capture your screen and send it to their web site).

By writing a browser plug-in (such as an ActiveX control, which would work only in IE), you could write the necessary Win32 code to take a screen shot. It would still require some heavy lifting to manage the image, uploading, file security, etc. You might be able to write the COM control in C#, but it would need to be placed in the GAC (thus signed, etc.).

There are other solutions that involve local native installation and a browser based Silverlight application, but all require an installation on the PC.

I'd suggest considering instead a simple, zero-install (or click-once), EXE that can be run from a PC that just takes a screen shot and uploads it/e-mails/etc.. That would involve far fewer hacks to make it work.

Note that Windows 7 has a new accessory, called the Snipping Tool that can take an image of the screen and e-mail it.

like image 76
WiredPrairie Avatar answered Jun 03 '26 21:06

WiredPrairie