when i right click on web browser is it possible to get my application on right click option?

Recommended Answers

All 3 Replies

See if this helps.

Public Class Form1
    Private WithEvents cmCool As New ContextMenuStrip
    Private sTemp As String = "myCool.exe"

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With WebBrowser1
            .IsWebBrowserContextMenuEnabled = False '// disable WebBrowser ContextMenu.
            cmCool.Items.Add(sTemp) '// add item to your ContextMenu.
            .ContextMenuStrip = cmCool '// set ContextMenu to WebBrowser.
        End With
    End Sub

    Private Sub _cmCool_ItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmCool.ItemClicked
        Select Case e.ClickedItem.Text
            Case sTemp
        End Select
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.