MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Delphi-MapPoint Type Library

This is a discussion on Delphi-MapPoint Type Library within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi EveryBody I'm trying to use MapPoint Inside my delphi application. I've read this very useful article: Using MapPoint In ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  16 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-04-2007
Junior Member
Yellow Belt
 
Join Date: Jan 2007
Posts: 13
Delphi-MapPoint Type Library

Hi EveryBody

I'm trying to use MapPoint Inside my delphi application. I've read this very useful article: Using MapPoint In Delphi : it did work two months ago, but it does no more now!!

I followed all the instructions in the article, but when I try to run my application, I get the following error:
Code:
 [Pascal Error] MyProject.dpr(14): E2018 Record, object or class type required

Here is the code of Myproject:

program MyProject;

uses
Forms,
Main in 'Main.pas' {FrmMain},
MapPoint_TLB in 'MapPoint_TLB.pas';

{$R *.TLB}

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TFrmMain, FrmMain);
Application.Run;
end.

Besides, I can't find the activex tab in the component palette (neither MapPoint's TMap & Co, wherever I try to import the TLB?)
Where am I mistaking?
Do I have to start BDS in .Net Personality to use MapPoint?

Thnk u for your help
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 05-04-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Re: Delphi-MapPoint Type Library

Hi,

You dont have to include the TLB in your project. It only has to be in the uses clause of the units that really use it.

Line 14 is Application.Run ?
If so the the form's constructor runs without errors (but the problem can be over there as well).

Set some breaks in the begin of the following events of your main form:
FormCreate
FormShow
FormActivate

Also if you post custom messages in the FormCreate event you should set a break there as whell. Then you come to the line of the offending code.
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 05-04-2007
Junior Member
Yellow Belt
 
Join Date: Jan 2007
Posts: 13
Re: Delphi-MapPoint Type Library

Quote:
Originally Posted by Wilfried View Post
Hi,

You dont have to include the TLB in your project. It only has to be in the uses clause of the units that really use it.

Line 14 is Application.Run ?
If so the the form's constructor runs without errors (but the problem can be over there as well).

Set some breaks in the begin of the following events of your main form:
FormCreate
FormShow
FormActivate

Also if you post custom messages in the FormCreate event you should set a break there as whell. Then you come to the line of the offending code.
Again: thnk u a lot

I'm still learning so sorry for the 'wired' questions
I'll do that right now.
The problem is that I remember I Used to drag & drop the TMap component from the component palette on my forms and 'handle it' by code.
Now, it's no more possible: why that? I'm using BDS 2006 and mappoint 2006 (I tested it for the first time with BDS 2005 and MapPoint 2004): does this make any difference or explain the problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 05-04-2007
Junior Member
Yellow Belt
 
Join Date: Jan 2007
Posts: 13
Thumbs up Re: Delphi-MapPoint Type Library

That's AWESOME

I just solved my problem (almost).

The fact is that I tried to import the TLB in the project (and was automatically included in the current project). I did't included Mappoint_TLB in the units.

But I still can't find TApplication, TMap in the component palette.
Anyway, I use mappoint with the OleContainer and IT ROCKS

If I manage to make a useful application (hopefully), I'll share it here.
Again: THANKS EVERYBODY: this forum is GREAT.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 05-04-2007
Junior Member
Yellow Belt
 
Join Date: Jan 2007
Posts: 13
Arrow Re: Delphi-MapPoint Type Library

I Still can't find <TApplication> in the component palette: any idea of why the problem? (If I can't figure out the problem, how will I find the solution )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 05-04-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Re: Delphi-MapPoint Type Library

Hi Michel,

Quote:
Anyway, I use mappoint with the OleContainer and IT ROCKS
This is already great news

Quote:
But I still can't find TApplication, TMap in the component palette.
I don't know. I stopped upgrading Delphi. Latest version I have is Delph7 and this one does not work with the ActiveX component, only the object model. But if it is not in the component pallette then, in my version it is 'import - activeX' or something...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-08-2007
Junior Member
White Belt
 
Join Date: Nov 2007
Posts: 3
Re: Delphi-MapPoint Type Library

Just move the *_TLB.pas file higher(top) in the DPR uses clause and you will get rid of "E2018 Record, Object or class type required" error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-09-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Re: Delphi-MapPoint Type Library

Hi,

Quote:
Originally Posted by danmincu View Post
Just move the *_TLB.pas file higher(top) in the DPR uses clause and you will get rid of "E2018 Record, Object or class type required" error.
Thanks for the reply. You right. Probably it is the conflict because Delphi has already an Application object, and now mappoint jumps in with an object of same name. Delphi search uses clause from bottom to top, so moving it solves.

You can also solve it by renaming the Application object to something else in the TLB. This was what I did. I think I called it _Application or __Application
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/delphi-mappoint-type-library-5865.html

Posted By For Type Date
A More Compact Method for Obtaining Lat/Long - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 01:41 PM
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 01:34 PM
Snap to a Road - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 01:24 PM
Delphi Address Verifier - MapPoint Articles - MP2K Magazine This thread Refback 05-14-2007 01:22 PM
MapPoint User Community - MP2K Magazine This thread Refback 05-13-2007 03:04 PM
MapPoint Download - MP2K Magazine This thread Refback 05-11-2007 05:26 AM
An API to Control MapPoint 2006 GPS Features - Part I of II - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 06:56 PM
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 02:24 PM
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 02:17 PM
Automating MapPoint with the .NET SDK - MapPoint Articles - MP2K Magazine This thread Refback 05-10-2007 01:17 PM
Microsoft MapPoint 2006 - MP2K Magazine This thread Refback 05-10-2007 10:54 AM
Extending the MapPoint ActiveX Control - Pt. I - MapPoint Articles - MP2K Magazine This thread Refback 05-09-2007 12:06 PM
Pocket Streets Conversion Tool Made Available - MapPoint News - MP2K Magazine This thread Refback 05-09-2007 11:09 AM
MapPoint Articles - MP2K Magazine This thread Refback 05-08-2007 05:19 AM
Working With Excel and MapPoint - MP2K Magazine This thread Refback 05-08-2007 12:33 AM
Mapping Recent Earthquake Data - MapPoint Articles - MP2K Magazine This thread Refback 05-05-2007 08:38 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
MapPoint Library Redistribution Hamaze MapPoint 2006/2009 Discussion 1 02-24-2005 12:38 PM
mppoint object library Anonymous MP2K Magazine Articles 1 10-21-2004 06:19 AM
I can't find the MapPoint COM library Anonymous MapPoint Web Service and Virtual Earth 4 10-05-2004 06:16 AM
How do you read from a FindResults type in delphi? matt1168 MapPoint 2006/2009 Discussion 3 02-27-2004 07:57 AM
Control vs. Object Library Labtek MapPoint 2006/2009 Discussion 0 05-24-2003 12:39 AM


All times are GMT -5. The time now is 05:49 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

Cheap Flights to Benidorm
Book cheap flights to Benidorm with Holiday Hypermarket. Whether Summer or Winter Benidorm is a great destination.

Flights to Italy
Find cheap flights to Italy on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Italy.

Holiday Italy
A Holiday in Italy can mean many different things to many different people. This diverse country has an abundance of art, wine, food and stunning beaches. Book online today.

Bahamas Holidays
Bahamas Holidays offer pure blue skies, soft white beaches and the holiday of a lifetime. Visit us for a great deal to the Bahamas.

Greece
Greece covers a large area and as a result there is an abundance of things to do, see and taste. You can relax on a beach, visit ancient sites or make a trip to one of the islands like Corfu, Crete or Rhodes.

Cheap family holidays
To plan cheap family holidays, use Travel.co.uk to explore all the delightful possibilities that there are.

Holidays to Florida
Sun and sea! Get info on holidays to Florida, only 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