MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to detect Shape Name on SelectionChange event

This is a discussion on How to detect Shape Name on SelectionChange event within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi folks I'm using vb6 I am aware I can apparently tell what KIND of object has been selected ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  8 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-02-2007
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 48
Unhappy How to detect Shape Name on SelectionChange event

Hi folks

I'm using vb6

I am aware I can apparently tell what KIND of object has been selected in this event.

I wish to discern whether it is a shape object and further what name (I'll take ordinality even) the shape is in this event SelectionChange.

I create Shapetype 5's (Custom Polygon) using .AddPolyLine for the user.

I wish to allow the user multiple polygonal shapes on the same MapPointControl

problem I'm having is with pNewSelection is passed in this event.

I have studied posts here to learn about the casting apparantly of pNewSelection to the respective object you want, it is still unclear to me just what pNewSelection IS, short of a variance of object types depending on what is clicked, some generic object ? )

But I have had no success in discerning whether it is a Shape object and further - deriving it's name.

I DO assign a formal name to the shape as is recommended after its creation to bump up from ordinal reference.

To follow up in clarity - I wish to know when a custom poly is clicked upon , and further its name.

I'll ask about DriveTime shape (which I observe is type 5 too, no clue on discerning that from custom poly, I guess it is all in all at the end of the day) distinction later ! heh -

Any insights are welcomed.

Thanks in advance

Tim Miltz
Re-inventing the infinite sided polygon (wheel) one side at a time !
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 11-02-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,038
Re: How to detect Shape Name on SelectionChange event

Hi,

theObject as Shape;

will null theObject if it is not a Shape. This is same syntax in almost any language I know.
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/how-detect-shape-name-selectionchange-event-6675.html

Posted By For Type Date
A More Compact Method for Obtaining Lat/Long - MapPoint Articles - MP2K Magazine This thread Refback 11-07-2007 03:15 AM
Apple Blog » Blog Archive » How to detect Shape Name on SelectionChange event This thread Pingback 11-05-2007 04:57 PM
Create 3D Map Video - Win a Free Zune from Microsoft - MapPoint News - MP2K Magazine This thread Refback 11-05-2007 06:48 AM
Merging Multiple Routes - MapPoint Articles - MP2K Magazine This thread Refback 11-04-2007 04:15 PM
MapPoint Help - MP2K Magazine This thread Refback 11-02-2007 09:50 AM
Programming MapPoint via .NET - MapPoint Articles - MP2K Magazine This thread Refback 11-02-2007 07:37 AM
Automating MapPoint in C++ With Built In GPS Features Enabled - MapPoint Articles - MP2K Magazine This thread Refback 11-02-2007 07:30 AM
Determing Whether A Point Is Located Inside Polygon - MapPoint Articles - MP2K Magazine This thread Refback 11-02-2007 07:27 AM

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
SelectionChange(NewSelection,OldSelection) in VC++ VC_Man MapPoint 2006/2009 Discussion 3 01-04-2007 08:23 AM
Detect presence of pushpin PMACAFEE MapPoint 2006/2009 Discussion 1 11-19-2006 01:48 PM
SelectionChange Event calv1ns MapPoint 2006/2009 Discussion 1 10-12-2006 12:55 PM
SelectionChange event Yazzy MapPoint 2006/2009 Discussion 0 05-16-2006 09:25 AM
Detect a pushpin name change. Daniel MapPoint 2006/2009 Discussion 2 08-10-2004 06:27 AM


All times are GMT -5. The time now is 08:18 AM.


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

Catered Chalet Ski Holidays
Looking for catered chalet ski holidays? Your search is over! Here at Holiday Hypermarket you can choose your style of accommodation with ease.

Travel Counsellors
Travel Counsellors are an award winning Travel Agent. Have a personal Travel Counsellor help with your travel plans.

Jamaica Holidays
Jamaica Holidays can include world class business hotels, upscale shopping and top entertainment and dining. Alternatively, hit the beach or hike in the hills. Book online with us.

Nile Cruises
Nile cruises are one of the best ways to discover the riches of Egypt. See ancient ruins and lush verdure from the River Nile. Book today!

Turkey
Before booking a holiday to Turkey check out the ULookUBook travel guide. Find out about the rich culture in Turkey before you go there to help you to make the most of your holiday.

Cheap holiday comparison
Travel.co.uk is a comparison service which makes it easy to search and find your cheap holiday options.

Cheap Portugal Holidays
Hotels of all ratings! Find information on cheap Portugal holidays at On The Beach!


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