MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




[Invalid Pointer] : what's wrong ?

This is a discussion on [Invalid Pointer] : what's wrong ? within the MapPoint 2006/2009 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 ...


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 11-18-2002
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
[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
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-18-2002
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
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.
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
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
invalid, pointer, wrong


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
Recordset exception. What am I doing wrong? Anonymous MapPoint 2006/2009 Discussion 3 01-25-2005 03:26 PM
What am i doing wrong??? alt-088 MapPoint 2006/2009 Discussion 2 09-16-2004 04:37 PM
is there a way of geting the location of the mouse pointer matt1168 MapPoint 2006/2009 Discussion 3 07-04-2003 02:25 PM
reverse geo coding, results wrong Anonymous MapPoint 2006/2009 Discussion 2 09-22-2002 10:11 AM
Wrong answer from ConvertToLatLong dpietrocarlo MapPoint 2006/2009 Discussion 2 09-20-2002 04:18 PM


All times are GMT -5. The time now is 07:07 PM.


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