Hi all
i drew a polygon to a form. It it possible to change the color of the polygon using the mouse down event, if so how?
heres my polygon code, their will be 50 diffrent polygons I want to change the colors of each one individually on mouse down event
i drew a polygon to a form. It it possible to change the color of the polygon using the mouse down event, if so how?
heres my polygon code, their will be 50 diffrent polygons I want to change the colors of each one individually on mouse down event
Code:
Private Sub MainFormLoad(sender As System.Object, e As System.EventArgs)
'Defines new bitmap
Dim states As bitmap= new Bitmap(mapdraw.Width,mapdraw.Height)
'Draws image to Picturebox
Me.mapdraw.Image=states
'Defines your graphics holder
Dim g As Graphics = Graphics.FromImage(states)
Dim greenb as solidbrush=new solidbrush(color.green)
'creates polygons in the shape of states
Dim WASHINGTON() As Point = { _
New Point(95,35), _
New Point(82,72), _
New Point(93,78), _
New Point(92,88), _
New Point(158,110), _
New Point(177,63), _
New Point(113,35), _
New Point(112,46) _
}