16,722
社区成员




For i = 0 To Me.DataGridView1().Rows.Count - 1
Dim row As DataGridViewRow = DataGridView1.Rows(i)
If row.Cells(0).Value = True Then
Dim n As Integer = 0
Dim xEnd As Integer = 0
…… '绘制打印内容
If yPos >= ev.PageBounds.Height - margin Then '超出页面高度追加新的页面
ev.HasMorePages = True
yPos = margin_Top
Else
ev.HasMorePages = False '未超出当前页面情况下,不追加新页面
End If
End If
If i = Me.DataGridView1().Rows.Count - 1 Then '数据打印结束设置
ev.HasMorePages = False
End If
Next