Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to print a windows form completely in high quality in c# visual studio

What I have tried:

How to print a windows form completely in high quality
Posted
Updated 29-Dec-17 6:24am

Don't. Forms are input devices, designed to interact well with the user. Printed output isn't because it can't interact, it's a static object.
Instead, use a PrintDocument Class (System.Drawing.Printing)[^] to specify exactly what gets printed, and where.

If you need screenshots for a manual etc., then use ALT + CTRL + PRINTSCREEN to copy to the clipboard.
 
Share this answer
 
You can save the form image to a bitmap and save it as a graphic file:

System.Drawing.Bitmap b = new System.Drawing.Bitmap(this.Width, this.Height);
this.DrawToBitmap(b, new Rectangle(0, 0, this.Width, this.Height));
b.Save(@"c:\myform.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
 
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