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 4 of 4

Mouse Down Event -> Form_DB.Show-> Problems with Varia

This is a discussion on Mouse Down Event -> Form_DB.Show-> Problems with Varia within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi Folks, got a problem with the mouse down event: On clicking on a pushpin, I open a Form and ...

  1. #1
    blackmap is offline Member Yellow Belt
    Join Date
    Dec 2002
    Posts
    39

    Mouse Down Event -> Form_DB.Show-> Problems with Varia

    Hi Folks,

    got a problem with the mouse down event:
    On clicking on a pushpin, I open a Form and want to get a variable value from the main form. This only works every second time. With the using of a timer with 5 secs interval it works (bit who wants to wait 5 secs...).

    Any ideas?

    Thanks a lot

    Peter

  2. #2
    jia_1980 is offline Junior Member White Belt
    Join Date
    Jan 2003
    Posts
    6
    Hi, I think maybe you can try this sub:
    'Map1 is a mappoint control

    Private Sub map1_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)
    Dim xx As Long, yy As Long
    'You need check your scalemode property. I am using twip in VB, but mappoint uses pixel.

    xx = X / Screen.TwipsPerPixelX
    yy = Y / Screen.TwipsPerPixelY


    Dim objtemp As MapPoint.FindResults
    Set objtemp = objMap.ObjectsFromPoint(X, Y) 'objmap is a mappoint.map object
    If TypeOf objtemp.Item(1) Is MapPoint.Pushpin Then
    Load Form1 'This is the form you want to show
    ' Do what you want to do, like "Form1.Label1.Caption = frmSearch.Label1.Caption"
    Form1.Show 1
    Else
    MsgBox "It is not a pushpin"
    End If
    End Sub

    Good luck.

  3. #3
    blackmap is offline Member Yellow Belt
    Join Date
    Dec 2002
    Posts
    39

    That's what I did. It is not working. See above...

    That's what I did. It is not working. See above...

  4. #4
    blackmap is offline Member Yellow Belt
    Join Date
    Dec 2002
    Posts
    39

    Thanks a lot!!! Yippie, I fixed the error:

    Private Sub MappointControl1_GotFocus()
    If Form_DB.Visible = True Then
    Form_DB.SetFocus
    End If
    End Sub

    I commented the code above. Then it worked...

    Thanks a lot!!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Capturing Mouse Wheel Event
    By Anonymous in forum Bing Maps and MapPoint Web Service
    Replies: 2
    Last Post: 11-30-2005, 07:31 AM
  2. Trying to get the MapPoint.Location at a mouse event
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 07-30-2005, 07:41 AM
  3. find city name & state name on mouse move event
    By Atul22 in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-15-2004, 04:28 AM
  4. mouse down event
    By henemonster in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-31-2003, 02:04 PM
  5. Show another form after mouse_down event...
    By blackmap in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-21-2003, 02:21 PM

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