Graphics object representing a specific form.

  • Thread starter Thread starter teejayem
  • Start date Start date
T

teejayem

I want a way to create an object based on the graphics class
representing a specific form without having to use the
PaintEventArgs.Graphics passed as a parameter when calling the OnPaint
event.

Any ideas?
 
I want a way to create an object based on the graphics class
representing a specific form without having to use the
PaintEventArgs.Graphics passed as a parameter when calling the OnPaint
event.

Any ideas?

MyForm.CreateGraphics()

Thanks,

Seth Rowe
 
rowe_newsgroups said:
MyForm.CreateGraphics()

ACK, but make sure you read the documentation and are aware of the
side-effects. For example, note that certain operations will make the
'Graphics' object invalid because the form's handle has been recreated.
Consequently it doesn't make sense to store the object returned by the
'CreateGraphics' call in a private variable for later use.
 
Back
Top