MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to use MouseEvents with Delphi in an TOleContainer ?

This is a discussion on How to use MouseEvents with Delphi in an TOleContainer ? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am using MP2002 with Delphi and the TOleContainer as it is described by Jack Melger ( http://www.mp2kmag.com/articles.asp?...delphi.example ). The ...


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 01-07-2003
Member
Green Belt
 
Join Date: Nov 2002
Posts: 52
How to use MouseEvents with Delphi in an TOleContainer ?

I am using MP2002 with Delphi and the TOleContainer as it is described by Jack Melger
(http://www.mp2kmag.com/articles.asp?...delphi.example).

The code is:

procedure TForm1.FormActivate(Sender: TObject);
var vGuid : TGuid;
begin
OleContainer.CreateObject('MapPoint.Map.EU.9', False);
OleContainer.DoVerb(1);
OleContainer.OleObjectInterface.GetUserClassID(vGu id);
FMap := IDispatch(OleContainer.OleObject) as _Map;
end

Now I want to use the the MouseDown-Event to get a coordinate for my application.

How do I do that ?

When I use MP2002 as a separate application and put TMap on the form this is easy. But with TOleContainer ?

Regards
Rainer Barthels
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 01-12-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
MapPoint events in Delphi

Hello Rainer,

Apart from the FMap in the OleContainer you should add a TMap component to your form. Then you have to use the ConnectTo command from Delphi to connect the FMap to the TMap component. Now you can use all events of the TMap component in your application.

Good luck, Jack.
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 01-14-2003
Member
Green Belt
 
Join Date: Nov 2002
Posts: 52
Thank you very much. That works.
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
delphi, mouseevents, tolecontainer


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
Web service with delphi Anonymous MapPoint Web Service and Virtual Earth 1 11-10-2004 09:43 AM
DriveTimeZone Delphi Anonymous MapPoint 2006/2009 Discussion 0 10-20-2004 05:56 AM
Delphi Anonymous MapPoint 2006/2009 Discussion 2 12-18-2003 12:11 PM
pushpins with delphi ian MapPoint 2006/2009 Discussion 2 06-19-2003 01:15 PM
'AddCommand' + Delphi stuarth MapPoint 2006/2009 Discussion 0 04-09-2003 10:18 AM


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