Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Webbrowser Find text question

Webbrowser Find text question

Scheduled Pinned Locked Moved C#
question
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matthew Cuba
    wrote on last edited by
    #1

    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?

    M 1 Reply Last reply
    0
    • M Matthew Cuba

      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?

      M Offline
      M Offline
      Matthew Cuba
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups