I'm trying to download an image from a page. But it only show (Image Found) if i manually click on right click, i want it to download automatically anyone now a better solution ? Tried

GeckoImageElement img = (GeckoImageElement)wb1.Document.GetElementById("imgcode"); 
if (wb1.CopyImageContents())

MessageBox.Show("done");

if (Clipboard.ContainsImage())

MessageBox.Show("Image Found!!");
有帮助吗?

解决方案

Geckofx contains a SaveImageElement class which may help you. Eg. the following should copy the 'imgcode' img to the clipboard:

wb1.CopyGeckoImageElementToPng(img, 0,0,img.Width,img.Height);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top