 |
|
อยากทำให้ข้อมูลที่จะปริ้นออกมาสั้นลงครับ เพราะตอนนี้ข้อความยาวทะลุหน้ากระดาษออกไปเลย
คืออยากให้มันตัดไปเลยพอมันยาวเกินไปหน่ะครับ
อันนี้คือรูปที่เป็นอยู่ตอนนี้ครับ

ส่วนโค้ดตรงรายการคืออันนี้ครับ
Code (C#)
private void print2(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Font ft1 = new Font("TH Sarabun New", 10, FontStyle.Bold);
for (int i = 0; i <= dataGridView1.RowCount - 1; ++i)
{
e.Graphics.DrawString(dataGridView1.Rows[i].Cells[1].Value.ToString(), ft1, Brushes.Black, 10, line);
line += 25;
}
ขอความกรุณาด้วยครับ
Tag : .NET, Ms Access, Win (Windows App), C#, VS 2017 (.NET 4.x)
|
|
 |
 |
 |
 |
Date :
2020-04-10 18:28:17 |
By :
KaeWalin |
View :
791 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |