Hi all,
I am trying to set up a picturebox in a form so i can add small rectangles (points of interest) over a floor plan. I have the following code which does exactly what i want but im having trouble filling the rectangles with solid colour. Heres the code i have:
Any help gratefully received.Code:Dim MyRect As New Rectangle(e.X, e.Y, 10, 10) Dim g As Graphics = Me.picShowPicture.CreateGraphics Dim Pn As Pen = New Pen(Color.Red) 'Create pen from color Dim Mybrush = New SolidBrush(Color.Red) points.Add(e.Location) ' For Each p As Point In points picShowPicture.Invalidate(MyRect) If ComboBox4.Text = ("Computer") Then g.DrawRectangle(Pn, MyRect) 'g.FillRectangle(Mybrush, MyRect) End If Next g.Dispose()
Kev


Reply With Quote
