Code for Find (on This Page) Feature In Webbrowser Menustrip

With Visual Basic 2005 Express I am using the WebBrowser control and a MenuStrip control to create my own browser.

I want to include a "Find (on This Page)” option under the Edit section of the menustrip. This would be exactly like Internet Explorer where clicking "Edit/Find" produces a “Find” dialogue box for doing a word search in the loaded Web page.

I have searched the MSDN library but have not been able to find anything to get me started. Any specific programming advice (e.g., code) or general suggestions linking to pertinent resources would be greatly appreciated.



Answer this question

Code for Find (on This Page) Feature In Webbrowser Menustrip

  • AIMDBA

    Hi,

    Following code should do the trick:

    WebBrowser1.Focus()
    SendKeys.Send(
    "^(f)")

    Max



  • Kev160967

    FANTASTIC!! Exactly what I wanted. I love simplicity.

    Thanks Max.


  • Code for Find (on This Page) Feature In Webbrowser Menustrip