문제

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