private void button1_Click(object sender, EventArgs e)
{
printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.pd_PrintPage);
printDocument1.Print();
}
private void pd_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(pictureBox1.Image, 0, 0, pictureBox1.Image.Width, pictureBox1.Image.Height);
}
不难吧,先获取Panel的矩形,然后用drawImage画出图片,进行打印
由第三方的插件,可以去网上找找看,自己写的话太麻烦...