Webbrowser Find text question
-
Hello, I have a WebBrowswer control in my application and I can do a SendKeys.Send("^f") to open the Find dialog in the window. This is nifty enough. What I'd like to do is populate that textbox widget on the Find dialog with a string of my choosing, but frankly I'm not sure where to start on this. As I've got the text - via some processing in my application that is likely the text the user will want to search for, I'd like to populate it without having the user fat finger it in. Any ideas? Thanks much, Matt
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?
-
Hello, I have a WebBrowswer control in my application and I can do a SendKeys.Send("^f") to open the Find dialog in the window. This is nifty enough. What I'd like to do is populate that textbox widget on the Find dialog with a string of my choosing, but frankly I'm not sure where to start on this. As I've got the text - via some processing in my application that is likely the text the user will want to search for, I'd like to populate it without having the user fat finger it in. Any ideas? Thanks much, Matt
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?
So, I solved it myself. Clipboard.SetText(theTextString); will set the desired text in the clipboard. The somewhat cheesy solution for the paste was to do: timer1.Start(); and in the time1_Tick handler, do: SendKeys.Send("^v"); Not necessarily elegant, but it did the trick.
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?