Graphics object representing a specific form.

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?
 
R

rowe_newsgroups

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
 
H

Herfried K. Wagner [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top