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 DownloadHandler implementation.
            browser.DownloadHandler = new MyDownloadHandler();

            // Load URL that initiates file download process.
            browser.LoadURL(
                "http://cloud.teamdev.com/downloads/dotnetbrowser/dotnetbrowser-1.8.zip");

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

        public class MyDownloadHandler : DownloadHandler
        {
            public bool AllowDownload(DownloadItem download)
            {
                // Register Downlow Progress Event listener.
                download.DownloadEvent += delegate(object sender, DownloadEventArgs e)
                {
                    // Download is completed.
                    if (e.Item.Completed)
                    {
                        Console.Out.WriteLine("Download is completed!");
                    }
                };
                // Allow downloading file.
                return true;
            }
        }
    }
}

VB.NET

Imports System.Threading
Imports DotNetBrowser
Imports DotNetBrowser.Events

Module MyNamespace
    Sub Main(ByVal args As String())

        Dim waitEvent = New ManualResetEvent(False)
        'Create Browser instance.
        Dim browser As Browser = BrowserFactory.Create()
        'Register custom DownloadHandler implementation.
        browser.DownloadHandler = New MyDownloadHandler(waitEvent)
        'Load URL that initiates file download process.
        browser.LoadURL("http://cloud.teamdev.com/downloads/dotnetbrowser/dotnetbrowser-1.8.zip")
        'Wait while loading
        waitEvent.WaitOne()
        'Dispose Browser instance.
        browser.Dispose()
    End Sub

    Public Class MyDownloadHandler
        Implements DownloadHandler

        Dim WaitEvent As ManualResetEvent

        Sub New (waitEvent As ManualResetEvent)
            Me.WaitEvent = waitEvent
        End Sub

        Public Function AllowDownload(ByVal download As DownloadItem) As Boolean _
            Implements DownloadHandler.AllowDownload
            'Register Download Progress Event listener.
            AddHandler download.DownloadEvent, sub(ByVal sender As Object, ByVal e As DownloadEventArgs)
                'Download is completed.
                If e.Item.Completed Then
                    Console.Out.WriteLine("Download is completed!")
                    WaitEvent.Set()
                End If
            End sub
            'Allow downloading file.
            Return True
        End Function
    End Class
End Module