MapWinGIS:AxMap MouseUp

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

MouseUp

This event is fired when the mouse button is released while the cursor is in the map control. The map property SendMouseUp must be set to True for this event to be fired.
See also SendMouseUp


VB.NET Usage

Event MouseUpEvent(Sender As Object, e As AxMapWinGIS._DMapEvents_MouseUpEvent)

            Parameters

Sender

The sender of the event.
e.button The button pressed on the mouse to create this event.
e.shift The shift/ctrl modifiers pressed during the creation of this event.
e.x The x coordinate of this event in pixel coordinates.
e.y The y coordinate of this event in pixel coordinates.

Sample Code

    Private Sub Map1_MouseUpEvent(ByVal sender As Object, ByVal e As AxMapWinGIS._DMapEvents_MouseUpEvent) Handles Map1.MouseUpEvent
        'This will draw a point where you click on the map if you have a 
        'spatially referenced shapefile or grid displayed on the map
        Dim x As Double, y As Double
        'Convert pixel coordinates of mouse up event e.x and e.y to projected coordinates returned by x and y
        Map1.PixelToProj(e.x, e.y, x, y)
        'Create a new drawing layer in map1
        Map1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlSpatiallyReferencedList)
        'Draw a red point where the mouse up event occured in map1
        Map1.DrawPoint(x, y, 5, System.Convert.ToUInt32(RGB(255, 0, 0)))
    End Sub
  

VB 6 Usage

Event MouseUp(Button As Integer, Shift As Integer, x As Long, y As Long)
            Parameters

Button

The button pressed on the mouse to create this event.
Shift The shift/ctrl modifiers pressed during the creation of this event.
x The x coordinate of this event in pixel coordinates.
y The y coordinate of this event in pixel coordinates..

Sample Code

    Private Sub Map1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Long, ByVal y As Long)
        'This will draw a point where you click on the map if you have a
        'spatially referenced shapefile or grid displayed on the map
        Dim px As Double, py As Double
        'Convert pixel coordinates of mouse up event e.x and e.y to projected coordinates returned by x and y
        Map1.PixelToProj x, y, px, py
        'Create a new drawing layer in map1
        Map1.NewDrawing (dlSpatiallyReferencedList)
        'Draw a red point where the mouse up event occured in map1
        Map1.DrawPoint px, py, 5, RGB(255, 0, 0)
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:AxMap_MouseUp"

This page has been accessed 1,775 times. This page was last modified on 9 November 2005, at 18:38.