add this namespace
using System.Drawing.Printing;
using System.IO;
class label variable
System.Drawing.Bitmap memoryimage;
write this code printbutton_click event
PrintDialog myprintdialog = new PrintDialog();
memoryimage = new System.Drawing.Bitmap(panelprint.Width, panelprint.Height);
panelprint.DrawToBitmap(memoryimage, panelprint.ClientRectangle);
if (myprintdialog.ShowDialog() == DialogResult.OK)
{
System.Drawing.Printing.PrinterSettings value;
value = myprintdialog.PrinterSettings;
myprintdialog.Document = printDocument1;
printDocument1.PrintController = new StandardPrintController();
panelprint.BackColor = Color.White;
printDocument1.Print();
}
<pre lang="cs">private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(memoryimage, -2, 30);
}</pre>
where panelprint is the name of panel
I think this is helpfull to u..........
Regard
Sham :)