automation - How to convert IHTMLImgElement to image -


i automating internet explorer using shdocvw.dll , mshtml c#, , wish save image page disk (jpeg format).

i can't use webclient class download image; if it, end downloading site's login page. can't print screen either, because browser has remain invisible during process, running in background.

i have tried following:

ihtmlimgelement imgelement = ...; ihtmlcontrolrange imgrange = ...;  imgrange.add(imgelement ihtmlcontrolelement); imgrange.execcommand( "copy", false, null ); 

this nothing. not able extract clipboard. every solution found didn't work me.

your webclient approach missing cookies... see how log site webclient? example handles cookies.

your code looks fine except user has change security setting enable clipboard access. if image cached on disk can dig wininet cache after parsing page image location.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -