Community of VE/MapPoint Users and Developers
This is a discussion on Override draw circle selection within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i wont something simple.. i dont want to load the drawing toolbar on my OCX... but i wont to ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| i wont something simple.. i dont want to load the drawing toolbar on my OCX... but i wont to use a button instead on my form. It's ok if the underling logic remain the same.. same event and so on... simply.. i wont that a user press my button it's like he pressed the draw circle button on the toolbar. I use this handler for th event: private void axMappointControl1_SelectionChange(object sender, AxMapPoint._IMappointCtrlEvents_SelectionChangeEve nt e) { object o = e.pNewSelection; MapPoint.Shape s = (MapPoint.Shape)e.pNewSelection; if (s.AutoShapeType == MapPoint.GeoAutoShapeType.geoShapeRadius) {} } is it possible??? regards.. Gianmaria |
| |||
|
Hi, To do exacly same behavour is not an easy task, but I think you can do it simple if behavour is a little different. Let's think: - User click your button, then he have to click on the map where he want the center of the shape. - User move mouse away, shape will redraw automatically to the place where the mouse is. - User click again, and the drawing stops. I think this is acceptable procedure. Other approach could be drawing as long as mouse button is down, or whatever. Anyway if this kind is good for you then you can do following: - In the button click you set a global bool drawingCircle = true; - In the beforeClick you check drawingCircle, and if true you create the shape with diameter of 0. the Shape variable has to be global to the class of course. - In mouseMove you check drawingCircle and calculate the distance to the center of the shape. If you have the distance then re set the diameter. - In beforeClick you stop drawing. It is not complete, you have to make the difference to the 2 beforeClicks, but It should give an idea I hope. What do you think ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| circle, draw, override, selection |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Radius of a Circle | Gianmaria | MapPoint 2006/2009 Discussion | 1 | 07-14-2006 02:32 PM |
| How to draw radius circle of a specific altitude... | Learner | MapPoint 2006/2009 Discussion | 2 | 03-24-2006 05:17 AM |
| Override a route | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-14-2005 06:56 AM |
| Override Mp 2004 Contextual menus with VB .Net 2003 | tardifj | MapPoint 2006/2009 Discussion | 1 | 03-29-2004 10:42 PM |
| How do I draw a circle, rectangle, ellipse or free.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-26-2000 01:35 PM |