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

[Invalid Pointer] : what's wrong ?

This is a discussion on [Invalid Pointer] : what's wrong ? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I've made a VB6 program which include the CalcPos sub made by Gilles Kohl. It was running well until ...

  1. #1
    Vincent BENNER's Avatar
    Vincent BENNER is offline Member Yellow Belt
    Join Date
    Sep 2002
    Posts
    44

    [Invalid Pointer] : what's wrong ?

    Hello,

    I've made a VB6 program which include the CalcPos sub made by Gilles Kohl. It was running well until I made some changes but I can't success to go back ;-(

    I've created a VB6 application which opens a new map.
    I've inserted a simple button with the following code :

    Dim objMAP As MapPointCtl.Map
    Dim objPP As MapPointCtl.Location
    Dim X As Double
    Dim Y As Double

    Set objMAP = Me.ctrlMAPPOINT.ActiveMap
    Set objPP = objMAP.FindPushpin("21000, DIJON")

    Call CalcPos(objMAP, objPP, X, Y)

    MsgBox "X = " & X & vbCrLf & "Y = " & Y, , "IT WORKS !"

    I obtain a stupid error, Invalid pointer. I've tried with the
    Dim objMAP As MapPoint.Map
    Dim objPP As MapPoint.Location
    instructions but the problem is the same...

    objPP returns every time a nothing reference !

    The code is made for France, but it should works with any place.
    "21000, DIJON" works fine into MapPoint

    Regards,

    Vincent BENNER

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    the "FindPushpin method" finds a pushpin that is already on the map, it is not for creating a pushpin. Use FindResults method insted. Also your DIM objPP as MapPointCTL.location would not have worked for the FindPushpin Method.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Recordset exception. What am I doing wrong?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-25-2005, 02:26 PM
  2. What am i doing wrong???
    By alt-088 in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 09-16-2004, 03:37 PM
  3. is there a way of geting the location of the mouse pointer
    By matt1168 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-04-2003, 01:25 PM
  4. reverse geo coding, results wrong
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 09-22-2002, 09:11 AM
  5. Wrong answer from ConvertToLatLong
    By dpietrocarlo in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 09-20-2002, 03:18 PM

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