Sorry I didn't clearly explain the question.
How can I print a WinForms by using C# code.
I am looking to have a button in my form and after pressing the button, the
form and it's data get printed. The form might contain scrollable ritch text
boxes.
Thank you,
Max
> Hi,
>
[quoted text clipped - 7 lines]
>
> Cerebrus.
"Jeffrey Tan[MSFT]" - 21 Mar 2006 03:44 GMT
Hi Max,
Thanks for your feedback.
To programmatically capture a screen shoot of the form, we can p/invoke
Win32 BitBlt API. Please refer to "How do I capture a bitmap of a form?"
topic from the link below:
http://msdn.microsoft.com/smartclient/community/wffaq/default.aspx
Below is a VB.net sample:
"Code: Printing a Windows Form (Visual Basic)"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbcode/h
tml/vbtskCodeExamplePrintingForm.asp
Hope this helps!
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.