Retrieving Selected Text from Webbrowser control in .net(C#)

前端 未结 4 2085
余生分开走
余生分开走 2020-12-05 11:06

I\'ve been trying to figure out how to retrieve the text selected by the user in my webbrowser control and have had no luck after digging through msdn and other resources, S

4条回答
  •  一个人的身影
    2020-12-05 11:57

    And if You just use the technique bellow?

    //Copy selected text to clipboard

            Clipboard.Clear();
            SendKeys.SendWait("^(c)");
    

    //Get selected text from clipboard

            string strClip = Clipboard.GetText().Trim();
            Clipboard.Clear();
    

提交回复
热议问题