I have a web browser control which has navigated to a given page and is ready. Now I want to bring up the Internet explorer find dialogbox whenever the user clicks a specific button on my page. The user can already bring up the find dialog box by clicking ‘ctrl+f’, but I want a separate button for this action too.
I have found this:
http://support.microsoft.com/kb/329014
But It have the following issues with it:
-
The page says that this method might not work on later versions of Internet explorer:
Warning This sample uses an
undocumented command-group GUID that
is subject to change in the future.
Although this sample was tested to
work correctly with Internet Explorer
6 and earlier, there is no guarantee
that these techniques will continue to
work successfully in future versions. -
I cant compile the code. I have added the references described in the page but I get errors telling AxSHDocVw namespace could not be found.
I found a solution myself:
If the web browser control name is “web”, you can send the “Crtl+f” key to it with the following code:
I tested this and it brought up the find dialog box on Internet explorer 8.