110,567
社区成员
发帖
与我相关
我的任务
分享
HTMLDocument html = (HTMLDocument)this.wbReg.Document.DomDocument;
IHTMLControlElement img = (IHTMLControlElement)wbReg.Document.Images["code_img"].DomElement;
IHTMLControlRange range = (IHTMLControlRange)((HTMLBody)html.body).createControlRange();
range.add(img); range.execCommand("Copy", false, null);
img = null; range = null; html = null;
if (Clipboard.ContainsImage()) { this.pictureBox1.Image = Clipboard.GetImage(); }
else { MessageBox.Show("执行不成功"); }
Clipboard.Clear();