Groups | Blog | Home
all groups > dotnet sdk > september 2006 >

dotnet sdk : How to print from Panel control


radiax
9/1/2006 4:14:12 PM
Here is my problem... Iam trying to find a way to print only the panel
control and NOT the whole form. Is there a way to do this under .Net
2.0?...Can I just grab the panel.CreateGraphics and print from it ??
Thanks guys

Bryan Phillips
10/16/2006 8:01:42 PM
Calling CreateGraphics on a control will only give you a canvas to write
on. In other words, it will allow you write on top of the panel but not
print it. The best way is to get the hwnd from the panel and use that
to call a Win32 function to do a screen capture which you can
subsequently print.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com




[quoted text, click to view]
AddThis Social Bookmark Button