right, silly question, but how do I access "e.Graphics" outside the scope of this function?
private void HopfieldRecForm_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
...
...
}
right, silly question, but how do I access "e.Graphics" outside the scope of this function?
private void HopfieldRecForm_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
...
...
}
A graphics object is sealed. It cannot simply be instantiated. you can create one from an image to use to draw to the image, but as far as painting to a form or control, you are pretty much stuck using Paint events. But that's the extent of their usefulness anyway.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.