How to use an embedded search in IE via interface "TWebBrowser"?

Giganews Newsgroups
Subject: How to use an embedded search in IE via interface "TWebBrowser"?
Posted by:  bitek
Date: Wed, 27 May 2009

Hello there!

I write a program, using IE as a component for viewing html docs.
However, I need to realize a browser-like search in documents while viewing.

All i could is here:
SearchRange = ((Document as IHTMLDocument2).Body as
.... // - some defining range code
if (SearchRange.FindText(Str, Flags*$FFFFFFF, 0)) SearchRange.Select;

It works, but:
1. I need to change a dynamic range for realizing "find next" and "find
previous" functions.
2. It searches in hidden and collapsed blocks too. I want to search only
within visible range.
2. if some text is invisible because of its css style, method Select causes
an uncatcheble exception.

That's why i want to call standard search interface, like i pressed "ctrl+f"
and "find" button. How can I do it via IE interface? (Of course, instead of
the emulation of pressing "ctrl+F"+Enter =)

Who knows, how to call searh interface? I haven't gathered this information
in the MSDN.