backbufferGraphics と呼ばれる BufferedGraphics があり、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);
}
ありがとう!