[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

How do I invoke the Find (On this Page) (^F) in Internet Explorer from a Command Button in an HTML document?

I hope someone can help me on this one since I'm relatively new to Visual Basic 6.0 .....

What I would like to do is have the user click on a command button which would invoke the Find (On This Page) feature in Internet Explorer. The questions I have are:

1) What type of project in Visual Basic 6.0 do I use to invoke the Find (On This Page) "^F" feature in Internet Explorer on a custom web page (DHMTL App, ActiveX IDE, ActiveX DLL, ActiveX Control, etc...)?

2) After doing some research on Sendkeys it seems that there may be some library(ies) that I need to call....If so then what do I need to declare?

3) How would the code look like in VB code?
  • 2
1 Solution
if you want a browser embedded into your app, create a new project, go to components and tick "microsoft internet controls". drop the browser onto your form.

you should be able to us:

to pop up the find dialog box but good old microsoft has deliberately disabled it. take a look here:

HCAAdminAuthor Commented:
Thanks to you I got some good ideas and a better understanding of VB 6.0......
However I guess what I meant to say is that I need a macro button on my own web page that sends Ctrl+F to IE browser and invokes the Find (On This Page) prompt box to appear. I found javascript code that will generate a Find text box however our CEO really wants the IE version (CTRL+F) and javascript & php cannot invoke this since IE does not allow it......

I've heard it's possible to do this using VB6.0 since it is a Microsoft product. Do you or anyone else know how to do this or even if it is possible?  
it should be possible but microsoft has "disabled this behaviour" - by design of course! see http://support.microsoft.com/kb/q251133/

i can't think of any other way of getting it to work but of course, if you're using a browser in vb, you can create a fairly extensive find function yourself.

Featured Post

New feature and membership benefit!

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

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now