Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

How to detect Shape Name on SelectionChange event

This is a discussion on How to detect Shape Name on SelectionChange event within the MapPoint Desktop 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 in ...

  1. #1
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    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 !

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SelectionChange(NewSelection,OldSelection) in VC++
    By VC_Man in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-04-2007, 08:23 AM
  2. Detect presence of pushpin
    By PMACAFEE in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-19-2006, 01:48 PM
  3. SelectionChange Event
    By calv1ns in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-12-2006, 12:55 PM
  4. SelectionChange event
    By Yazzy in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-16-2006, 09:25 AM
  5. Detect a pushpin name change.
    By Daniel in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-10-2004, 06:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88