以下のコードでビットマップを印刷しようとしていますが、機能しません。どうしてか分かりません....
private void btnImprimir_Click(object sender, EventArgs e)
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += PrintPage;
pd.Print();
}
private void PrintPage(object o, PrintPageEventArgs e)
{
button1.Visible = false;
button2.Visible = false;
button3.Visible = false;
button4.Visible = false;
Bitmap bitmap = new Bitmap(this.Width, this.Height);
this.DrawToBitmap(bitmap, this.ClientRectangle);
Point loc = new Point(this.Width, this.Height);
e.Graphics.DrawImage(bitmap, loc);
button1.Visible = true;
button2.Visible = true;
button3.Visible = true;
button4.Visible = true;
}