Community of VE/MapPoint Users and Developers
This is a discussion on Click events of context menu are not firing.... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi There, First keep the following parameters in mind to understand my problem: Application : C#.NET Framework: .NET 1.1 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Click events of context menu are not firing.... First keep the following parameters in mind to understand my problem: Application : C#.NET Framework: .NET 1.1 MapPoint: MapPoint2004 Europe Scenario: I've made a user control on which I've placed the ActiveX control of mappoint. The control will be used in another form. I've attached a context menu to mappoint control in User control. The context menu is displaying accurately by passing the default context menus. Problem: The problem is that when I click on any menu option, the click event is not fired but if I try Select event it works just fine. I don't know what is going wrong? Can anyone help me please? Thanks in advance Regards
__________________ Learn from cradle to the grave |
| |||
|
Hi, Sorry I dont understeand what you try to say. Can you enlighten more ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Here am i with more elaboration on the issue
Hi Wilfried, Well I thought that I've already made an elaborated description of my problem but your answer suggest me some different opinion. Anyway, let me give it another try to explain it a bit more. So here is the series of action in my application:
Now I created another form. Placed my user control on it. When I run the application and load that form, it loads map on it at runtime. When I right click on it then my own context menu appears as I intend to do by passing the default one. But when I click on any context menu option, the click event is not fired. If instead of click event, I register Select event then it works but since it is fired whenever mouse comes over any option hence its not what I'm looking for. I think its clear now though it has got heavier in terms of text.... Thanks in advance Regards
__________________ Learn from cradle to the grave |
| |||
|
Hi, Thanks for detailed explanation. If I read now again your first one it is also very clear, but it was not for me I never used a user control, but I assume there is some bug here and there because you try probably an untested situation. I think it is best to place the MP control on a form with his context menu to avoid problems. Sorry, I know this does not answer your question direcly, but doing so you are also rid of the problem.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Click events of context menu are not firing....
Hi Wilfried, Thanks for your proposed solution but it still does not work. Though my requirement is to use user control to do all that business but to analyze the problem I tested your proposed solution. I created a form and place an ActiveX map control on it. Then in BeforeClick event I cancelled the default menus and showed my own menu in MouseDown event. The context menu is appearing fine but when I clicked on any of menu option, no click event is firing. I've seen discussion that e.Cancel = true also cancels the events so is it the same problem here? If yes how to tackle it and if no then what can be the reason for it. Anyone proposing a solution is highly appreciated please. Regards
__________________ Learn from cradle to the grave |
| |||
|
Hi, I just did following test: MP ActiveX on a main form Context menu named PopupMenu with 1 item and a Click event with: Code: Console.Beep(); Code: private void MP_BeforeClick_1(object sender, AxMapPoint._IMappointCtrlEvents_BeforeClickEvent e)
{
e.cancel = true;
PopupMenu.Show(MousePosition); I use VS2005 and dotNet version 2.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Click events of context menu are not firing....
My context menu, called by a timer as suggested, wasn't firing either until I changed the contextMenu1->Show(axMappointControl1,Point(clickX,clickY)) to contextMenu1->Show(this,Point(clickX,clickY)) where this is Form1 or whatever. |
![]() |
| Tags |
| click, context, control, event, form, mappoint |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| By Right-click displaying context menu on map | Banu | MapPoint 2006/2009 Discussion | 19 | 10-16-2007 07:46 AM |
| Disable Context menu | Anonymous | MapPoint 2006/2009 Discussion | 10 | 05-27-2005 01:03 PM |
| Custom context menu | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-10-2004 10:15 PM |
| Extending MapPoint - How about the Context Menu Enhancements | Anonymous | MapPoint 2006/2009 Discussion | 2 | 02-10-2004 09:38 AM |
| VB.NET & overriding the map point context menu... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2002 08:25 AM |
Rome Flights
Rome flights can be costly flights if you don't know where to book. You can find the latest deals from the leading UK Tour Operators at Holiday Hypermarket.
Flights to Spain
Find and book flights to Spain. Travel Counsellors can help with travel to Spain including flights and accommodation.
Cheap Holidays to Turkey
If you’re looking for cheap holidays to Turkey then dealchecker.co.uk is the place for you! Our search helps you see real prices from the UK’s top holiday companies all in one go.
Holidays in Dubai
Holidays in Dubai are an eclectic mix of the ancient and the modern. Discover an oasis of luxury amid the Arabian desert. Book here now!
Cheap Spain Holidays
Stay well informed when you are searching for cheap holidays online. For useful advice on when to book cheap Spain holidays make sure you look on ulookubook.com
Travel Deals
Click here and read up on the travel deals available online.
Holidays to Goa
Golden beaches, coconut trees. Visit On The Beach for holidays to Goa, and experience India!