Community of VE/MapPoint Users and Developers
This is a discussion on No visual MapPoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi. I'm searching a way to create an object with mappoint for a service. But no visible object. without components ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| No visual MapPoint I'm searching a way to create an object with mappoint for a service. But no visible object. without components like panels, forms, or whatever thing like those. I need it for delphi 7. In this moment i'm testing with a visual form, and with an OleContainer i can create mappoint on a Panel (The container), but it isn't i need. somebody know how? thanks! |
| |||
|
Hi, This little Delphi class opens mappoint in background (invisible). It try to open version 2004 Europe first, if not it checks for 2002 version. You eventally have to change the registry search for version 2006 and of course for the US versions also if nececary. Code: unit uMP;
interface
uses
Windows, SysUtils, Classes, MapPoint_TLB, Registry, Math;
type
TOnError = procedure(Sender: TObject; E: Exception) of object;
TMapPoint = class
private
FMP: _Application;
FOnError: TOnError;
public
constructor Create(ErrorProc: TOnError);
destructor Destroy; override;
end;
implementation
{ TMapPoint }
constructor TMapPoint.Create(ErrorProc: TOnError);
var
Reg: TRegistry;
FileName: string;
begin
inherited Create;
FOnError := ErrorProc;
try
FMP := CoApplication.Create;
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CLASSES_ROOT;
if not Reg.OpenKey('.ptm\MapPoint.Map.EU.11\ShellNew', False) then
if not Reg.OpenKey('.ptm\MapPoint.Map.EU.9\ShellNew', False) then
Exit;
FileName := Reg.ReadString('FileName');
FMP.OpenMap(FileName, False);
finally
Reg.Free;
end;
except
on E: Exception do
if Assigned(FOnError) then
FOnError(Self, E);
end;
end;
destructor TMapPoint.Destroy;
begin
FMP.ActiveMap.Saved := True;
FMP.Quit;
inherited;
end;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mappoint, visual c++ vs visual basic | Anonymous | MapPoint 2006/2009 Discussion | 6 | 03-30-2004 09:17 PM |
| Visual Basic. NET and MapPoint | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-30-2003 02:49 PM |
| Visual C++.net and MapPoint | evschu | MapPoint 2006/2009 Discussion | 1 | 07-07-2003 04:04 PM |
| Visual basic or visual c++ in mappoint | misterb83 | MapPoint 2006/2009 Discussion | 1 | 02-14-2003 08:31 AM |
| I am using Mappoint with Visual C++ via automation.... | Anonymous | MapPoint 2006/2009 Discussion | 2 | 07-08-2002 01:07 AM |
Cheap flights to Rhodes
For cheap flights to Rhodes make Holiday Hypermarket your final destination. Holiday Hypermarket help you to have a fantastic affordable holiday.
Flights to Spain
Find cheap flights to Spain on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Spain.
Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.
Holidays in Dubai
Holidays in Dubai are an eclectic mix of the ancient and the modern. Discover an oasis of luxury amid the Arabian desert. Book here now!
Portugal
As well as providing some great weather Portugal has much to offer culturally. There are numerous museums, monuments and places of historical interest to explore. Despite the rich history there is a buzzing nightlife and great shopping too.
Compare flight prices
Travel.co.uk makes it easy for you to compare flight prices from hundreds of UK based travel companies.
Portugal Holidays
We specialise in Portugal holidays. Visit our On The Beach website for more information.