Hi,
I'd recommend to have a single painting routine instead which would be able
to draw on any given Graphics. This way, you would use the single routine to
draw on the panel as well on the e.graphics within the PrintPage event
handler.
Bear in mind though that the resolution on these Graphics can be quite
different - a picture looking quite big on the screen can look much smaller
when printed. So the routine should possibly adjust for different DPIs and
so on. I am not an expert in this field, unfortunately, so I cannot give any
detailed advice on how to allow for printer/screen resolution. I think you
can post such questions to the WinForms/GDI+ newsgroup to get more help from
experts there.
"Flare" <no****@sorry.dk> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi. I have made a simple painting applcation.
I have a mainform wich creates a class called drawingPanelwich inherit
from Panel. In the drawingPaneli have overriden onPaint an the the painting.
Now on my mainform i have a button called Print. I know how to print
....PrintPageEventArgs e (e.graphics......)
But HOW do i get the things i ave painted on the drawingPanel? I cant see
how i can access this temporary paint job. How is this normally done?
Thanks in regards
Anders