C#

using System;
using DotNetBrowser;
using DotNetBrowser.Events;

namespace MyNamespace
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create Browser instance.
            Browser browser = BrowserFactory.Create();

            // Register custom LoadHandler implementation.
            browser.LoadHandler = new MyLoadHandler();

            // Load "http://www.google.com" URL.
            browser.LoadURL("http://www.google.com");

            // Dispose Browser instance.
            browser.Dispose();
        }
    }

    public class MyLoadHandler : DefaultLoadHandler
    {
        public override bool OnLoad(LoadParams loadParams)
        {
            // Suppress loading everything with URL that starts with "http://www.google.com".
            if (loadParams.Url.StartsWith("http://www.google.com"))
            {
                return true;
            }
            return false;
        }
    }
}

VB.NET

Imports DotNetBrowser

Module MyNamespace
        Sub Main(ByVal args As String())
            'Create Browser instance.
            Dim browser As Browser = BrowserFactory.Create()

            'Register custom LoadHandler implementation.
            browser.LoadHandler = New MyLoadHandler()

            'Load "http://www.google.com" URL.
            browser.LoadURL("http://www.google.com")

            browser.Dispose()
        End Sub

    Public Class MyLoadHandler
        Inherits DefaultLoadHandler

        Public Overrides Function OnLoad(ByVal loadParams As LoadParams) As Boolean

            'Suppress loading everything with URL that starts with "http://www.google.com".
            If loadParams.Url.StartsWith("http://www.google.com") Then
                Return True
            End If

            Return False
        End Function
    End Class
End Module