Sub Process_Globals
' here i am using a rectangle created by Designer:
Private rect1 As Node
Dim rlat As Double,rlon As Double,clat As Double,clon As Double
Dim isdrawon As Boolean
end sub
....
Sub MapPane1_Mouseclicked (EventData As MouseEvent)
If isdrawon=True Then
rect1.Left=EventData.X 'seems good here..
rect1.Top=EventData.y
rect1.width = 1
rect1.height = 1
rect1.Visible = True
End If
End Sub
Sub MapPane1_MousePressed (EventData As MouseEvent)
If isdrawon=True Then
'seems no with, height... :-( am i wrong and what to do ?
rect1.width = EventData.x - rect1.Left
rect1.height = EventData.Y - rect1.top
End If
' here must convert x,y of screen to lat/lon...
rlat = convertsomehow(rect1.left)
rlon = = convertsomehow(rect1.top)
.....clat,clon......
End Sub