Rank: Newbie Groups: Member
 
 
Joined: 11/11/2015 Posts: 1 
	 | 
		   
	     
		    Hello. How can I save image on EO.webbrowser? 
  When I used default web browser on c# I use this code for download image on web browser.
          [ComImport, InterfaceType((short)1), Guid("3050F669-98B5-11CF-BB82-00AA00BDCE0B")]         private interface IHTMLElementRenderFixed         {             void DrawToDC(IntPtr hdc);             void SetDocumentPrinter(string bstrPrinterName, IntPtr hdc);         }         public Bitmap GetImage(string id)         {             HtmlElement e = webBrowser1.Document.GetElementById(id);             IHTMLImgElement img = (IHTMLImgElement)e.DomElement;             IHTMLElementRenderFixed render = (IHTMLElementRenderFixed)img;
              Bitmap bmp = new Bitmap(e.OffsetRectangle.Width, e.OffsetRectangle.Height);             Graphics g = Graphics.FromImage(bmp);             IntPtr hdc = g.GetHdc();             render.DrawToDC(hdc);             g.ReleaseHdc(hdc);             return bmp;         }
		 
	 | 
	
		Rank: Administration Groups: Administration
 
 
Joined: 5/27/2007 Posts: 24,427 
	 | 
		   
	     
		    Hi,
  Such interface does not exist in EO.WebBrowser. In order to save image, you can try to get the image Url and then download the image directly from your code.
  Thanks!
		 
	 |