Community of VE/MapPoint Users and Developers
This is a discussion on Help: convert VB code to Delphi! within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Here is the VB code: Dim objPin As MapPoint.Pushpin Set objPin = MPMap.ActiveMap.Selection Here is my delphi code: ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Help: convert VB code to Delphi! Dim objPin As MapPoint.Pushpin Set objPin = MPMap.ActiveMap.Selection Here is my delphi code: var objpin begin objpin:=map.activemap.selection [Erreur] Unit1.pas(734): Types incompatibles : 'IDispatch' et 'Pushpin' Regards, SD |
| |||
|
Code compile, but objpin method or property don't work. I want to use this code to get Pushpin user click. Here's the complete VB code: Dim objPin As MapPoint.Pushpin ' Check if the user double-clicked on a pushpin If Not MPMap.ActiveMap.Selection Is Nothing Then If TypeOf MPMap.ActiveMap.Selection Is MapPoint.Pushpin Then Set objPin = MPMap.ActiveMap.Selection ' Do whatever with the pushpin... ' We've handled this double-click Cancel = True End If End If End Sub |
| |||
| re: Help: convert VB code to Delphi!
Seb, You may want to make sure that the Map.Selection reference ( to the object the user cliked on ) is actually a PushPin. It might be of some other type, like Location for instance. ///// suggestion var ppClickedPushPin:PushPin; ... if Map.ActiveMap.Selection<>nil then Map.ActiveMap.Selection.QueryInterface(IID_Pushpin , ppClickedPushPin); if ppClickedPushPin<>nil then begin // use ppClickedPushPin here end; ///// /jean-phi |
![]() |
| ||||
| Posted By | For | Type | Date | |
| MetaGer, Suche nach: typeof delphi | This thread | Refback | 07-02-2008 03:54 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert Lat Lon to X Y | Dazzer | MapPoint 2006/2009 Discussion | 9 | 04-27-2006 10:09 AM |
| Convert .ptm to .jpg | dkirk | MapPoint 2006/2009 Discussion | 6 | 03-03-2005 06:10 AM |
| Convert to Lat/Long | wallacech | MapPoint 2006/2009 Discussion | 1 | 02-26-2004 12:37 PM |
| Convert to Add-In | David Kachuck | MapPoint 2006/2009 Discussion | 0 | 07-06-2003 03:41 PM |
| Problems with Dutch ZIP codes (bug?) (Delphi code provided) | schuchhardp | MapPoint 2006/2009 Discussion | 2 | 11-28-2002 03:37 AM |
Flights from East Midlands Airport
Book low cost airline flights from East Midlands Airport. Holiday Hypermarket let you search for great deals from top tour operators.
Italy Weather
Check out Italy Weather - Travel Counsellors details information on Italy including, weather, flights and accommodation.
Flights to Cape Town
Before booking flights to Cape Town visit dealchecker.co.uk to make sure you are getting the best deal in town. Visit online today and try the holiday search for free.
St Lucia Holidays
St Lucia holidays offer something for everyone. Enjoyed by families and young couples alike, St Lucia is a great destination. See online!
Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com
Inclusive package holidays
Choose one of the many inclusive package holidays at Travel.co.uk and save a lot of trouble and money too!
Cheap Holidays in Sharm el Sheikh
Egypt awaits! Visit On The Beach for info on cheap holidays in Sharm el Sheikh.