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
| Sub GetCoordinates(ByVal Source As Object, ByVal Args As ImageClickEventArgs)''s'applique sur le clique de l'image en image button
Dim cord As String
cord = Session("coord")
If cord = Nothing Then
Session("coord") = Args.X.ToString + "," + Args.Y.ToString
cord = Session("coord")
Else
Session("Ncoord") = Args.X.ToString + "," + Args.Y.ToString
cord = Session("ncord")
Session("coord") = Session("coord") + "," + Session("Ncoord")
cord = Session("coord")
End If
cord = Session("coord")
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)//fin de la création du polygone
Dim xxx As New PolygonHotSpot
Dim coord As String
coord = Session("coord")
xxx.Coordinates = coord
imgMp.HotSpots.Add(xxx)''imgMp est la même image que l'image button en image map
Session("coord") = ""
End Sub |
Partager