473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Problem finding WebBrowser Find

I am using Visual C# Express Beta, though I suspect that my question
has more to do with .NET than with C# specifically. I have written a
form with a Web Browser in it. At the top I have a button bar. What
I want to do is to have a [Find] button which searches for
user-entered text in the HTML document in the Web Browser.

When I run my form I can type Ctrl-F and up comes a standard Find
dialogue box which does exactly what I want - the dialogue is
presumably built into the Web Browser as I certainly didn't put it
there. My problem is that I cannot find a way to trigger this Find
dialogue programatically so I can hook it into my [Find]. I have
looked through all the WebBrowser members and also through the
WebBrowser.Document members - no joy. Neither can I find a KeyPress
event attached to the WebBrowser so I could generate an internal
Ctrl-F to set things off.

If I have to I can code my own Find dialogue, but I would rather not
do this given that there is obviously one already built into the Web
Browser.

Does anyone have any thoughts as to ways to fire up the Web Browser's
Find dialogue programatically?

Thanks

rossum

--

The ultimate truth is that there is no Ultimate Truth
Nov 16 '05 #1
2 6513
rossum,

The simplest way:

webBrowser.Focus();
SendKeys.Send("^f");

I'm surprised that they included ShowPrintDialog etc. but didn't include
ShowFindDialog...

HTH,
Alexander

"rossum" <ro******@coldmail.com> wrote in message
news:49********************************@4ax.com...
I am using Visual C# Express Beta, though I suspect that my question
has more to do with .NET than with C# specifically. I have written a
form with a Web Browser in it. At the top I have a button bar. What
I want to do is to have a [Find] button which searches for
user-entered text in the HTML document in the Web Browser.

When I run my form I can type Ctrl-F and up comes a standard Find
dialogue box which does exactly what I want - the dialogue is
presumably built into the Web Browser as I certainly didn't put it
there. My problem is that I cannot find a way to trigger this Find
dialogue programatically so I can hook it into my [Find]. I have
looked through all the WebBrowser members and also through the
WebBrowser.Document members - no joy. Neither can I find a KeyPress
event attached to the WebBrowser so I could generate an internal
Ctrl-F to set things off.

If I have to I can code my own Find dialogue, but I would rather not
do this given that there is obviously one already built into the Web
Browser.

Does anyone have any thoughts as to ways to fire up the Web Browser's
Find dialogue programatically?

Thanks

rossum

--

The ultimate truth is that there is no Ultimate Truth

Nov 16 '05 #2
Thanks Alexander,

That worked perfectly - just what I needed.

rossum
On Sat, 12 Mar 2005 12:19:05 +0700, "Alexander Shirshov"
<al*******@omnitalented.com> wrote:
rossum,

The simplest way:

webBrowser.Focus();
SendKeys.Send("^f");

I'm surprised that they included ShowPrintDialog etc. but didn't include
ShowFindDialog...

HTH,
Alexander

"rossum" <ro******@coldmail.com> wrote in message
news:49********************************@4ax.com.. .
I am using Visual C# Express Beta, though I suspect that my question
has more to do with .NET than with C# specifically. I have written a
form with a Web Browser in it. At the top I have a button bar. What
I want to do is to have a [Find] button which searches for
user-entered text in the HTML document in the Web Browser.

When I run my form I can type Ctrl-F and up comes a standard Find
dialogue box which does exactly what I want - the dialogue is
presumably built into the Web Browser as I certainly didn't put it
there. My problem is that I cannot find a way to trigger this Find
dialogue programatically so I can hook it into my [Find]. I have
looked through all the WebBrowser members and also through the
WebBrowser.Document members - no joy. Neither can I find a KeyPress
event attached to the WebBrowser so I could generate an internal
Ctrl-F to set things off.

If I have to I can code my own Find dialogue, but I would rather not
do this given that there is obviously one already built into the Web
Browser.

Does anyone have any thoughts as to ways to fire up the Web Browser's
Find dialogue programatically?

Thanks

rossum

--

The ultimate truth is that there is no Ultimate Truth


--

The ultimate truth is that there is no Ultimate Truth
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mike | last post by:
Hi! I posted this question in browser_ctl group as well but got no results. I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
1
by: bastawhiz | last post by:
I want to create some method of finding elements in a htmldocument by their class. For example, if I am trying to find all divs with the class "friend", I would like something where I could go: ...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
4
by: David | last post by:
I'm using the AxSHDocVw.WebBrowser control to download data from a webpage at work (it's an internal page on my company's intranet). The page produces a runtime error after a while and the...
3
by: Dom | last post by:
I have a prgram with a webBrowser control. The user can click on a Linked Reference and the webBrowser control shows that site. Sometimes the URL (not my program, but the URL I am browsing to)...
11
by: AAaron123 | last post by:
I have an vs2008 app that generates a website. I have a vs2008 app that uses the webbrowser and does this: WebBrowser1.Navigate(New Uri(address)) the address is: ...
1
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
I have a piece of code that looks like this: XPathNavigator l_nav = xml_document.DocumentElement.CreateNavigator(); XslCompiledTransform l_xslt = new XslCompiledTransform();...
3
topher23
by: topher23 | last post by:
I'm trying to use a WebBrowser control to automate data entry from our local Access system to the web-based corporate ERP system. Unfortunately, I've run into a snag. Several of the text boxes that...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.