Hey everyone...
I wrote code within visual basic 2008 to create a tab-base web browser...now I want to use my own ContextMenuStrip and not the default one that IE has...but I'm having NO luck what so ever getting my contextmenustrip to show...
I know that if I add the WebBrowser control to my project I can attach my ContextMenuStrip to it within Design mode, but I am creating the browser at runtime and attaching it to the tab panel control...
Does anyone have any suggestion? what am I not seeing?
I wrote code within visual basic 2008 to create a tab-base web browser...now I want to use my own ContextMenuStrip and not the default one that IE has...but I'm having NO luck what so ever getting my contextmenustrip to show...
I know that if I add the WebBrowser control to my project I can attach my ContextMenuStrip to it within Design mode, but I am creating the browser at runtime and attaching it to the tab panel control...
Does anyone have any suggestion? what am I not seeing?
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("about:blank")
urlBox.AutoCompleteMode = AutoCompleteMode.Suggest
urlBox.AutoCompleteSource = AutoCompleteSource.HistoryList
[b]Browser.ContextMenuStrip = ContextMenuStrip1[/b]
End Sub