How to control application from WebBrowser Control?

I've googled it, but came out empty. And the worst thing is that I know it is possible.

Anyway, I'm developing an application that uses the WebBrowser control to display information regarding an object (like Outlook does with the Rules and Alerts dialog box).

My question is how do I do for the click on a, say, hyperlink in the WebBrowser execute some function within the Windows Form?

For instance, say I have a link like this and when I click it I want the application to display an specific form, like the Outlook does when you click on hyperlinks like People and Distribution List


This looks useful: How to: Implement Two-Way Communication Between DHTML Code and Client Application Code

ChrisW's answer will work, but there's another way if you're just relying on hyperlinks.

In Comicster, I have links in my WebBrowser control like this:

<a href="">New Collection</a>

And then in the WebBrowser's Navigating event, I have some code to check if the user has tried to navigate to an "action:" link, and intercept it:

private void webBrowser1_Navigating(object sender,
    WebBrowserNavigatingEventArgs e)
    if (e.Url.Scheme == "action")
        e.Cancel = true;

        string actionName = e.Url.LocalPath;
        // do stuff when actionName == "FileNew" etc

With a little bit of code you can even parse the URL parameters and "pass them through" to your host application's action, so I can do things like:

<a href="">Edit this issue</a>

... which will open a properties dialog for the issue with ID 1.


 ? How to capture events fired from new Popup IE window
 ? Remove jQuery effects if browser is certain size?
 ? Accessing Home page settings of phone's web browser from an app
 ? preventing google to detect your traffic by vb browser
 ? App with iAd and App without ad should in different projects?
 ? browser shows wrong DST when setting date
 ? How to get the value of an input box of the webbrowser control in WPF?
 ? How To Open Webpage without addressbar in android
 ? Outputting JSON with angle brackets in browser
 ? Fonts intermittently failing to load?