When I click a label I want it to draw rectangles (like bars) on specific areas of my form. I created this:
private void paintbars(PaintEventArgs e)
{
Pen blackPen = new Pen(Color.FromArgb(155,114,97), 1);
Rectangle rect = new Rectangle(0, 0, 200, 200);
e.Graphics.DrawRectangle(blackPen, rect);
}
and from the event of the label click I go with paintbars;
or paintbars();
or paintbars(e);
but it always underlines this specific command (paintbars without the e because it doesn't have the e, and with the e because it says it can't convert from eventargs to painteventargs).
I don't know how to call the method to draw. I also need this rectangles to be erased and redrawed later. How can I do this?