[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Implementing "Find on this page" in WebBrowser

Posted on 2000-05-08
6
Medium Priority
?
860 Views
Last Modified: 2012-06-21
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.ExecWB OLECMDID_FIND, OLECMDEXECOPT_DONTPROMPTUSER

Bonus points if you can indicate how to implement "Find Next (F3)" functionality...

0
Comment
Question by:AZWolf7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2789807
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.
0
 

Author Comment

by:AZWolf7
ID: 2789840
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.
0
 
LVL 14

Accepted Solution

by:
mcrider earned 300 total points
ID: 2790943
This works every time for me...

   WebBrowser1.SetFocus
   SendKeys "^f", True


You MUST send the ^f as lowercase... ^F doesn't work.


Cheers!®©
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:AZWolf7
ID: 2793183
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!
0
 

Author Comment

by:AZWolf7
ID: 2793185
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!
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2794642
Thanks for the points! Gladd I could help!


Cheers!®©
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question