- 博客(2)
- 资源 (3)
- 收藏
- 关注
c#打印窗体中的数据
打印窗体textbox中的数据: //在窗体中绘制要打印的数据
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
//绘制label1中的内容
e.Graphics.DrawString(label1.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black,270, 400);
//绘制textBox1中的内容
e.Graphics.DrawString(textBox1.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black, 330, 400);
//绘制label2中的内容
e.Graphics.DrawString(label2.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black, 270, 430);
//绘制textBox2中的内容
e.Graphics.DrawString(textBox2.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black, 330, 430);
//绘制label3中的内容
e.Graphics.DrawString(label3.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black, 270, 460);
//绘制textBox3中的内容
e.Graphics.DrawString(textBox3.Text, new Font("宋体", 20, FontStyle.Regular), Brushes.Black, 330, 460);
2010-05-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人