0
BufferedGraphics我有一個名爲BufferedGraphics和backbufferGraphics我想打印出來使用PrintDialog類緩存中的內容,這是我的代碼,但它不是工作:打印使用PrintDialog類
private print()
{
printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(printDocument1_PrintPage);
printDialog1.Document = printDocument1;
printDialog1.AllowSelection = true;
printDialog1.AllowSomePages = true;
printDialog1.ShowDialog();
}
void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
DrawToPrint(e.Graphics);
}
private void DrawToPrint(Graphics _Gd)
{
backbufferGraphics.Render(_Gd);
}
謝謝!