I have a WebBrowser control in a form with text data, and in this form I present two buttons. One to copy the entire contents (CTRL + A, CTRL + C), and the other to copy only the selected (using the mouse) text, that is, only CTRL + C, and then paste it into notepad.
Code for copying: (this works partially correctly, copies only to a certain point)
this.WebBrowser.Document.Focus(); SendKeys.SendWait("^a"); SendKeys.SendWait("^a^c"); this.WebBrowser.Refresh();
Code to copy: (this does not work at all)
this.WebBrowser.Document.Focus(); SendKeys.SendWait("^c"); this.WebBrowser.Refresh();
Could you tell me if this is correct?
source share