C#

using DotNetBrowser;
using DotNetBrowser.WinForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ContextMenuSample
{
    public partial class Form1 : Form
    {
        private Browser browser;
        public Form1()
        {
            InitializeComponent();

            browser = BrowserFactory.Create();
            BrowserView browserView = new WinFormsBrowserView(browser);

            browser.ContextMenuHandler = new MyContextMenuHandler((Control)browserView);
            this.Controls.Add((Control)browserView.GetComponent());

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

        }

        private class MyContextMenuHandler : ContextMenuHandler
        {
            Control view;
            public MyContextMenuHandler(Control view)
            {
                this.view = view;
            }

            public void ShowContextMenu(ContextMenuParams parameters)
            {
                System.Windows.Forms.ContextMenu popupMenu = new System.Windows.Forms.ContextMenu();
                if (!String.IsNullOrEmpty(parameters.LinkText))
                {
                    popupMenu.MenuItems.Add(new MenuItem("Open link in new window", delegate
                    {
                        String linkURL = parameters.LinkURL;
                        Console.Out.WriteLine("linkURL = " + linkURL);
                    }));
                }

                Browser browser = parameters.Browser;
                popupMenu.MenuItems.Add(new MenuItem("Reload", delegate
                {
                    browser.Reload();
                }));

                Point location = parameters.Location;

                view.Invoke(new Action(() =>
                {
                    popupMenu.Show(view, location);
                }));

            }
        }
    }
}

VB.NET

Imports DotNetBrowser
Imports DotNetBrowser.WinForms


Public Partial Class Form1
    Inherits Form

    Private browser As Browser

    Public Sub New()
        InitializeComponent()
        browser = BrowserFactory.Create()
        Dim browserView As BrowserView = New WinFormsBrowserView(browser)
        CType(browserView, Control).Dock = DockStyle.Fill

        browser.ContextMenuHandler = New MyContextMenuHandler(CType(browserView, Control))
        Me.Controls.Add(CType(browserView.GetComponent(), Control))
        browser.LoadURL("http://www.google.com")
    End Sub

    Private Class MyContextMenuHandler
        Implements ContextMenuHandler

        Private view As Control

        Public Sub New(ByVal view As Control)
            Me.view = view
        End Sub

        Public Sub ShowContextMenu(ByVal parameters As ContextMenuParams) _
            Implements ContextMenuHandler.ShowContextMenu
            Dim popupMenu As System.Windows.Forms.ContextMenu = New System.Windows.Forms.ContextMenu()

            If Not String.IsNullOrEmpty(parameters.LinkText) Then
                popupMenu.MenuItems.Add(New MenuItem("Open link in new window", sub()
                    Dim linkURL As String = parameters.LinkURL
                    Console.Out.WriteLine("linkURL = " & linkURL)
                End sub))
            End If

            Dim browser As Browser = parameters.Browser
            popupMenu.MenuItems.Add(New MenuItem("Reload", sub()
                browser.Reload()
            End sub))
            Dim location As Point = parameters.Location
            view.Invoke(New Action(Sub()
                popupMenu.Show(view, location)
            End Sub))
        End Sub
    End Class
End Class