Click here to Skip to main content
15,918,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make the Form1 of A4 size and then print the contents present on the form .

how do i print all the contents of the form , even the part which is not visible ( i.e visible after scrolling the form )

thanks pending......

Here's one solution in VB[^], but you can modify, etc.

I've also used the PrintPreview[^] control in combination with PrintDocument[^] and PageSetupDialog[^] to let the user select the paper size, but you can just set the size without the dialog if you are certain that the paper is available, etc.

For Code conversion
Convert VB.NET to C#[^]
Share this answer
Sergey Alexandrovich Kryukov 16-Jul-11 0:32am    
Good answer, my 5. I only added one general note in my solution, please see.
Printing a form is not a very good conception. You need to print data on a form from your data layer that is recommended to have, hence PrintDocument ([^]) provides a good flexible solution.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900