View Single Post

  #1 (permalink)  
Old 03-26-2004
tardifj tardifj is offline
Junior Member
White Belt
 
Join Date: Mar 2004
Posts: 1
Override Mp 2004 Contextual menus with VB .Net 2003

Hi,

Using VB .NET 2003, I can override the MapPoint contextual menu and show mine instead (in AxMappointControl1_MouseDownEvent).

My problem is that it looks that the events of each menu item can't be fired. Here is how I declare the events in Form1_Load :

mnuItem1 = New MenuItem("Menu One", New EventHandler(AddressOf MenuOne_Click))

And my Event handler is declared as follows :

Public Sub MenuOne_Click(ByVal source As Object, ByVal e As EventArgs)
MsgBox("Menu one has been clicked")
End Sub

While right-clicking on the map, my contextual menu is displayed. If I click on the menu item, the MsgBox will never be displayed (thus, my event is not fired)...

What is my problem? Any ideas?

Thank you

Jacques Tardif
Reply With Quote