spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

Top | Post New Question | Read All | MP2K Asks Microsoft

787 ketan parekh - July 15, 2002

Hi I have a problem. When i draw a line and then select it, a box appears on the start and the end of the line. I do not want that boxes to appear when the user selects the line. I nknow that is for the user to know that he/she has selected that line, but i do not need that. Please help.

Answer:
July 16, 2002
One way to do that is to use the BeforeClick evenement and then to cancel the click. It looks like that:
Private Sub ..._BeforeClick(ByVal Button As Long, ByVal Y As Long, Cancel As Boolean)
 On Error GoTo errBeforeClick
 Dim oResults As MapPoint.FindResults
 Dim oResult As Object
 If Button = 1 Then
  Set oResults = gMap.ObjectsFromPoint(X, Y)
  For Each oResult In oResults
   If TypeOf oResult Is MapPoint.Shape Then
    Cancel = True
    Exit Sub
   End If
  Next
 End If
 Exit Sub
errBeforeClick:
 Err.Clear
 Cancel = True
 Exit Sub
End Sub
Not really pretty but it works!
Doud

Post New Answer / Follow-up


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.