Note: Advice in this article will only work for DotNetBrowser 1.
See the corresponding article for DotNetBrowser 2 here.


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 "" URL.

            // Dispose Browser instance.

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


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 "" URL.

        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 "".
            If loadParams.Url.StartsWith("") Then
                Return True
            End If

            Return False
        End Function
    End Class
End Module