Top |
Post New Question |
Read All |
MP2K Asks Microsoft
835
macs
-
March 24, 2003
I am creating an application with VB and Mappoint. I have a form with a tree structure control and a Mappoint Control. How can I drag a pushpin on the map to a node in the tree? Your help is greatly appreciated.
Answer:
April 15, 2003
To drag a pushpin, you must program the control's MouseDown, MouseUp, MouseMove and SelectionChange events. Your code must assume that any MouseMove with the left button down is a "drag-mode" function. In SelectionChange, you will want to use the VB function TypeName to confirm that the newly selected object is a pushpin. As for dropping it on the tree, I've never tried this but I assume there would be a MouseUp event where you would detect that you were dragging a pushpin and process the event accordingly.
Post New Answer / Follow-up