I have a WinForm with a docked Panel.
I overrode the Panel’s Paint event.
I have a line that sets up _graphics object:
private Graphics _graphics;
In the override I initialize _graphics object:
private void GridPanel_Paint(object sender, PaintEventArgs e)
{
_graphics = e.Graphics;
<snip>
…
</snip>
}
Here comes the stupid part, Can I use this _graphics object in any other event like MouseMove?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…