private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{

           
                WebBrowser WebCtl = webBrowser1;
                HTMLDocument doc = (HTMLDocument)WebCtl.Document.DomDocument;
                HTMLBody body = (HTMLBody)doc.body;
                IHTMLControlRange rang = (IHTMLControlRange)body.createControlRange();
                IHTMLControlElement Img = (IHTMLControlElement)webBrowser1.Document.Images[0].DomElement; //图片地址
                Image oldImage = Clipboard.GetImage();
                rang.add(Img);
                rang.execCommand("Copy", false, null);  //拷贝到内存
                Image numImage = Clipboard.GetImage();
                numImage.Save(string.Format("c:\\ID2\\{0}.jpg", ID));
                string strID = ID--.ToString();
                webBrowser1.Navigate(@"https://1.6.1.8/Image/?img=1&id=" + strID);

            
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2021-05-23
  • 2021-07-10
  • 2022-12-23
  • 2021-06-15
相关资源
相似解决方案