Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How to Print a form in C#?
 

How to Print a form in C#?

Hi,
I am trying to print a form which is a longer form and has a scroll bar. Hence printing using the screen capture method to bitmap is ruled out as it only prints the part of the form which is visible. Drawing and painting each and every control also gives problems since I have some Office Web Components charts. Is there is a simpler way to do it?

Please help.

Thanks in advance.

C_Thunder  Sunday, July 23, 2006 4:47 AM

Hi C#Thunder,

I have an idea: you can iterate the control in your form, calculate the right-most distance and the bottom-most distance, and self-adjust the client area (by settting this.Size) in order to contain all the controls in the form before you capture the screen.

The method of printing a form can be found at

http://www.syncfusion.com/faq/windowsforms/search/491.aspx

.

gqlu  Monday, July 24, 2006 5:33 AM
Hi,
Thanks for your answer. I will try this out and let you know.

C_Thunder  Friday, July 28, 2006 6:45 AM

You can use google to search for other answers

Custom Search

More Threads

• Run other programs from your .NET code
• Let the end-user design at runtime
• How to call exe of another project in VB.Net 2005?
• How to make UserControl as a container
• help with vs2005 crashing because of my code
• DesignerActionList invoking template editing
• Constituent Properties
• Problems with the "(Name)" Property when I implements IExtenderListService
• Specifing the Editor a PropertyGrid should use on a Custom Control Property
• Form Designer; w/ Custom Properties