|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
C# - Printing a form with scrollable controlsHI,
I have an app that has a form with scrollable controls. So, I cannot make a bitmap from the printscreen and print it since all the content and controls are not visible at the same time. Is there a way in C# to print such a form - printing the whole content? Thanks, Avanti Use the System.Windows.Forms.Control.DrawToBitmap method:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx -- Show quoteHTH, Kevin Spencer Microsoft MVP Bit Player http://unclechutney.blogspot.com Where there's a Will, there's a William. "avanti" <ava***@gmail.com> wrote in message news:1168393129.232635.35450@p59g2000hsd.googlegroups.com... > HI, > > I have an app that has a form with scrollable controls. So, I cannot > make a bitmap from the printscreen and print it since all the content > and controls are not visible at the same time. > > Is there a way in C# to print such a form - printing the whole content? > > Thanks, > Avanti > avanti schreef:
> HI, You could try to maximize your Control (using the PreferredSize), here > > I have an app that has a form with scrollable controls. So, I cannot > make a bitmap from the printscreen and print it since all the content > and controls are not visible at the same time. > > Is there a way in C# to print such a form - printing the whole content? is an example of such an implementation: http://www.timvw.be/wp-content/code/csharp/ResizedControlPrintPageEventHandler.txt Be aware of the fact that this doesn't work when Docking is used so you might want to refine your approach... |
|||||||||||||||||||||||