Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

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 Desktop 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 ...

  1. #1
    rbarthels is offline 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

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    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.

  3. #3
    rbarthels is offline Member Green Belt
    Join Date
    Nov 2002
    Posts
    52
    Thank you very much. That works.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Web service with delphi
    By Anonymous in forum Bing Maps and MapPoint Web Service
    Replies: 1
    Last Post: 11-10-2004, 08:43 AM
  2. DriveTimeZone Delphi
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-20-2004, 04:56 AM
  3. Delphi
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 12-18-2003, 11:11 AM
  4. pushpins with delphi
    By ian in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-19-2003, 12:15 PM
  5. 'AddCommand' + Delphi
    By stuarth in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-09-2003, 09:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83