private Image GetWebImage()
{
Clipboard.Clear();
HTMLDocument html = (HTMLDocument)this.webBrowser1.Document.DomDocument;
IHTMLControlElement img = (IHTMLControlElement)webBrowser1.Document.Images["SPvalidateNumber"].DomElement;
IHTMLControlRange range = (IHTMLControlRange)((HTMLBody)html.body).createControlRange();
range.add(img);
range.execCommand("Copy", false, null);
Image numImage = Clipboard.GetImage();
using (MemoryStream mem = new MemoryStream())
{
//克隆Bitmap对象
Bitmap bmp = new Bitmap(numImage);
bmp.Save(mem, System.Drawing.Imaging.ImageFormat.Bmp);
numImage = new Bitmap(mem);
bmp.Dispose();
}
return numImage;
}