I'd like to draw X and Y axes on a panel at application launch. I've created this method:
public void Draw_axes()
{
Graphics gs = panel_main.CreateGraphics();
gs.DrawLine(pen, panel_main.Width / 2, 0, panel_main.Width / 2, (panel_main.Height )); //Asse Y
gs.DrawLine(pen, 0, panel_main.Height /2, panel_main.Width, panel_main.Height / 2); // Asse X
}
I tried to insert it in a Load but it doesn't work. I tried with the timer (I don't know how to use it very well though) but it doesn't work.
Could you please help me?