Welcome Guest Search | Active Topics | Sign In | Register

EO.Webbrowser Save İmage Options
deneme
Posted: Wednesday, November 11, 2015 9:15:46 AM
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;
}
eo_support
Posted: Wednesday, November 11, 2015 1:02:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.