MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Override draw circle selection

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2006
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Exclamation Override draw circle selection

Hi,
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-18-2006
Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 44
Anything in the hidden features of Mappoint ocx?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 09-19-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
circle, draw, override, selection


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 02:46 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54