0
Windows Form을 인쇄하려고합니다.C# Windows 양식 인쇄 - 화면의 잘못된 영역을 인쇄합니다.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(bmp, 0, 0);
}
Bitmap bmp;
private void button1_Click(object sender, EventArgs e)
{
Graphics g = this.CreateGraphics();
bmp = new Bitmap(this.Size.Width, this.Size.Height, g);
Graphics mg = Graphics.FromImage(bmp);
mg.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, this.Size);
printDialog1.ShowDialog();
printDocument1.Print();
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage);
}
}
그러나 그것은 나에게이 결과 제공 : 내 솔루션입니다
가 어떻게이 문제를 해결할 수 (프레임이 인쇄 된 용지의 경계를 보여주기 위해 만든 날입니다)을? 답에 대한 http://www.aspsnippets.com/Articles/Print-contents-of-Form-in-Windows-Forms-WinForms-Application-using-C-and-VBNet.aspx
감사합니다 :) 그러나 그것은 작동하지 않았다 : – qwerty