Code:
button1_Click
pnlLinks.Invalidate()
Dim i As Object
For each i In concoll
i.BackColor = Color.Transparent
Next
Dim g As Graphics
g = pnlLinks.CreateGraphics
g.FillRectangle(New SolidBrush(ColorTranslator.FromHtml("#003366")), rect)
g.DrawRectangle(New Pen(ColorTranslator.FromHtml("#99FF00")), rect)
CTL.BackColor = ColorTranslator.FromHtml("#003366")
CType(CTL.Tag, Panel).BackColor = ColorTranslator.FromHtml("#003366")
g.Dispose()
This is the code I use for my drawing of a rectangle. But what happens: I can see that there is drawn a rectangle one millisecond, but the rectangle disappears instantly. Why is that??