Click here to Skip to main content
15,944,731 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi I make a chart by Chart component in C# windows form
now I want to know how do I print it ?
Posted

By printing it. What have you tried ? Does google not work where you live ? Code Project does, so why not search the site for articles ?

First google hit[^]
 
Share this answer
 
Comments
esmailian 15-Jun-11 3:52am    
I searched Google but I do get to a faster solution if you do not know the answer do not have to answer
 
Share this answer
 
Comments
esmailian 15-Jun-11 4:51am    
Thanks
Hello Dear
public PrintingExample()
{
    PrintDocument PD = new PrintDocument();
    PD.PrintPage += new PrintPageEventHandler(PrintDocument_PrintPage);
    PD.Print();
}

private void PrintDocument_PrintPage(object sender, PrintPageEventArgs e)
{
    Bitmap Bmp = new Bitmap(this.DesktopBounds.Width,
                            this.DesktopBounds.Height);
    this.DrawToBitmap(Bmp, this.DesktopBounds);
    e.Graphics.DrawImage(Bmp, 0, 0);
}
 
Share this answer
 
Comments
esmailian 15-Jun-11 9:19am    
Thanks dost aziz shoma ham irani hastid

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