wpf - How to get content in webBrowser control -
assume type uri in textbox , click button load, web page loaded webbrowswer control, highlight piece of text in webbroswer control. , now, how can hightlighted text , display in textbox? (no copy/paste)
thanks!
retrieving selected text webbrowser control in .net(c#)
ihtmldocument2 htmldocument = webbrowser1.document.domdocument ihtmldocument2; ihtmlselectionobject currentselection= htmldocument.selection; if (currentselection!=null) { ihtmltxtrange range= currentselection.createrange() ihtmltxtrange; if (range != null) { messagebox.show(range.text); } }
Comments
Post a Comment