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

Re: C# - Printing a form with scrollable controls by Kevin

Kevin
Wed Jan 10 06:02:35 CST 2007

Use the System.Windows.Forms.Control.DrawToBitmap method:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

Where there's a Will, there's a William.

"avanti" <avanti@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
>



Re: C# - Printing a form with scrollable controls by Tim

Tim
Wed Jan 10 12:39:09 CST 2007

avanti schreef:
> 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?


You could try to maximize your Control (using the PreferredSize), here
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...


--
Tim Van Wassenhove <url:http://www.timvw.be/>