Click here to Skip to main content
15,946,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to print the windows form full (without close, restore, maximize buttons) in c# with higher quality of printing from the desired printers that i have installed in the computer.

What I have tried:

How to print the windows form full (without close, restore, maximize buttons) in c# with higher quality of printing from the desired printers that i have installed in the computer.
Posted
Updated 28-Dec-17 4:28am

1 solution

There's an article from Microsoft: How to: Print a Windows Form which shows how to print a form as is. You can change the code for the printButton_Click event to hide the controls, print, then restore the controls like so:
void printButton_Click(object sender, EventArgs e)
{
    this.ControlBox = false;                        
    CaptureScreen();
    printDocument1.Print();
    this.ControlBox = true;
}
Keep in mind that if you don't have a title for your form, it will hide the title bar.
 
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