标签:
private Image GetWebImage(WebBrowser WebCtl, HtmlElement ImgeTag)
{
HTMLDocument doc = (HTMLDocument)WebCtl.Document.DomDocument;
HTMLBody body = (HTMLBody)doc.body;
IHTMLControlRange rang = (IHTMLControlRange)body.createControlRange();
IHTMLControlElement Img = (IHTMLControlElement)ImgeTag.DomElement; //图片地址
Image oldImage = Clipboard.GetImage();
rang.add(Img);
rang.execCommand("Copy", false, null); //拷贝到内存
Image numImage = Clipboard.GetImage();
try
{
Clipboard.SetImage(oldImage);
}
catch
{
}
return numImage;
}
标签:
原文地址:http://www.cnblogs.com/aqdaye/p/5406424.html