I have an html page that allows users to click on a link to take a snapshot of any active window. When the user clicks on that button, control is passed to C# code of an ActiveX plugin (present in a CAB file), which takes the screenshot, and saves it at some temporary location. My problems are :
-
I wish to show the user that snapshot in a dialog box, and ask him to choose a name before sending it to the server. The snapshot is saved in a temporary location, and that location is obviously not accessible to the javascript code, and hence I can’t construct the dialog box in HTML. Is there any way around it ?
-
I have to upload the image to the server. Most examples I found, use the
<html type="file"/>technique to upload a file, but that’s not an option here, as we have to programmatically upload it.WebClient.uploadFile()would do this for me, but on the server side, do I treat it as if the file has been uploaded through the<html type="file"/> technique, or something special (the receiving end might be in Java) ?
If you are able to modify the activex component, you can make it expose the bitmap as a binary and use javascript to get the bytes and render them as a bitmap. Like this: