AZWolf7
asked on
Implementing "Find on this page" in WebBrowser
I need to implement the "Find on this page" dialog for the WebBrowser control. I have tried the following, and neither works correctly:
First, I tried sendkeys:
Me.WebBrowser1.SetFocus
SendKeys "^F"
This worked for a while, but I had to implement an interface to trap the right click on the menu. Doesn't seem to work anymore.
Second, I tried the ExecWB method. However, this method brings up the Find File method instead.
ActiveForm.WebBrowser1.Exe cWB OLECMDID_FIND, OLECMDEXECOPT_DONTPROMPTUS ER
Bonus points if you can indicate how to implement "Find Next (F3)" functionality...
First, I tried sendkeys:
Me.WebBrowser1.SetFocus
SendKeys "^F"
This worked for a while, but I had to implement an interface to trap the right click on the menu. Doesn't seem to work anymore.
Second, I tried the ExecWB method. However, this method brings up the Find File method instead.
ActiveForm.WebBrowser1.Exe
Bonus points if you can indicate how to implement "Find Next (F3)" functionality...
i think trying to find a way to use sendkeys is your best bet...let ie take care of using it...another expert and myself have been attempting to show the find and/or replace dialog ourselves through code but we can't keep it from crashing our programs. there are several pieces of code in C that show how to do it but we have been unable to duplicate it in vb.
ASKER
I have some C++ code which used the IOleCommand interface, but alas, can't seem to implement it. If I do find it, I'll post it here.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Still didn't take care of all the problems when you implement IDocHostUIHandler, but such a simple solution that works! I guess it is the simeple things that gey ya.. *grin*
thanks!
thanks!
ASKER
Still didn't take care of all the problems when you implement IDocHostUIHandler, but such a simple solution that works! I guess it is the simeple things that get ya.. *grin*
thanks!
thanks!
Thanks for the points! Gladd I could help!
Cheers!®©
Cheers!®©