打印预览中的文本框轮廓

时间:2018-10-28 20:03:48

标签: printing textbox outline print-preview

如何将文本框的轮廓添加到我的PagePrint事件中?当我查看“打印预览”时,文本框仅显示文本,不显示轮廓。这是我当前的代码。

 private void printDocument2_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
    {
        e.Graphics.DrawString(label13.Text, label13.Font, Brushes.Black, 81, 9);
        e.Graphics.DrawString(labelDateTime.Text, labelDateTime.Font, Brushes.Black, 95, 33);
        e.Graphics.DrawString(textBox1.Text, textBox1.Font, Brushes.Black, 111, 61);
        e.Graphics.DrawString(label15.Text, label15.Font, Brushes.Black, 26, 64);
        e.Graphics.DrawString(label12.Text, label12.Font, Brushes.Black, 26, 98);
        e.Graphics.DrawString(cardsTotalbox.Text, cardsTotalbox.Font, Brushes.Black, 111, 95);
        e.Graphics.DrawString(twoHundredrBox.Text, twoHundredrBox.Font, Brushes.Black, 25, 132);
        e.Graphics.DrawString(label11.Text, label11.Font, Brushes.Black, 108, 136);
        e.Graphics.DrawString(twoHundredrTotalbox.Text, twoHundredrTotalbox.Font, Brushes.Black, 152, 132);
        e.Graphics.DrawString(hundredrBox.Text, hundredrBox.Font, Brushes.Black, 25, 157);
        e.Graphics.DrawString(label10.Text, label10.Font, Brushes.Black, 108, 161);
        e.Graphics.DrawString(hundredrTotalbox.Text, hundredrTotalbox.Font, Brushes.Black, 152, 158);
        e.Graphics.DrawString(fiftyrBox.Text, fiftyrBox.Font, Brushes.Black, 25, 183);
        e.Graphics.DrawString(label9.Text, label9.Font, Brushes.Black, 108, 187);
        e.Graphics.DrawString(fiftyrTotalbox.Text, fiftyrTotalbox.Font, Brushes.Black, 152, 184);
        e.Graphics.DrawString(twentyrBox.Text, twentyrBox.Font, Brushes.Black, 25, 209);
        e.Graphics.DrawString(label8.Text, label8.Font, Brushes.Black, 108, 213);
        e.Graphics.DrawString(twentyrTotalbox.Text, twentyrTotalbox.Font, Brushes.Black, 152, 210);
        e.Graphics.DrawString(tenrBox.Text, tenrBox.Font, Brushes.Black, 25, 235);
        e.Graphics.DrawString(label7.Text, label7.Font, Brushes.Black, 108, 239);
        e.Graphics.DrawString(tenrTotalbox.Text, tenrTotalbox.Font, Brushes.Black, 152, 236);
        e.Graphics.DrawString(fiverBox.Text, fiverBox.Font, Brushes.Black, 25, 262);
        e.Graphics.DrawString(label6.Text, label6.Font, Brushes.Black, 108, 266);
        e.Graphics.DrawString(fiverTotalbox.Text, fiverTotalbox.Font, Brushes.Black, 152, 263);
        e.Graphics.DrawString(tworBox.Text, tworBox.Font, Brushes.Black, 25, 286);
        e.Graphics.DrawString(label5.Text, label5.Font, Brushes.Black, 109, 290);
        e.Graphics.DrawString(tworTotalbox.Text, tworTotalbox.Font, Brushes.Black, 152, 287);
        e.Graphics.DrawString(onerBox.Text, onerBox.Font, Brushes.Black, 25, 312);
        e.Graphics.DrawString(label4.Text, label4.Font, Brushes.Black, 109, 316);
        e.Graphics.DrawString(onerTotalbox.Text, onerTotalbox.Font, Brushes.Black, 152, 313);
        e.Graphics.DrawString(fiftycBox.Text, fiftycBox.Font, Brushes.Black, 25, 338);
        e.Graphics.DrawString(label3.Text, label3.Font, Brushes.Black, 109, 342);
        e.Graphics.DrawString(fiftycTotalbox.Text, fiftycTotalbox.Font, Brushes.Black, 152, 339);
        e.Graphics.DrawString(twentycBox.Text, twentycBox.Font, Brushes.Black, 25, 364);
        e.Graphics.DrawString(label2.Text, label2.Font, Brushes.Black, 109, 368);
        e.Graphics.DrawString(twentycTotalbox.Text, twentycTotalbox.Font, Brushes.Black, 152, 365);
        e.Graphics.DrawString(tencBox.Text, tencBox.Font, Brushes.Black, 25, 390);
        e.Graphics.DrawString(label1.Text, label1.Font, Brushes.Black, 109, 394);
        e.Graphics.DrawString(tencTotalbox.Text, tencTotalbox.Font, Brushes.Black, 152, 391);
        e.Graphics.DrawString(labeltotal.Text, labeltotal.Font, Brushes.Black, 53, 424);
        e.Graphics.DrawString(declairedTotalbox.Text, declairedTotalbox.Font, Brushes.Black, 152, 421);

0 个答案:

没有答案