Я хочу напечатать вторую строку на второй странице пожалуйста помогите мне
For Inti = 0 To Tbl.Rows.Count - 1 Dim _ImageRectF As New RectangleF _ImageRectF.Width = 100 _ImageRectF.Height = 30 _ImageRectF.X = Tbl(Inti)("ImageLeft") _ImageRectF.Y = Tbl(Inti)("ImageTop") Dim stream As New System.IO.MemoryStream() Dim _image As Byte() = DirectCast(Tbl(Inti)("ImageToPrint"), Byte()) stream.Write(_image, 0, _image.Length) Dim bitmap As New Bitmap(stream) e.Graphics.DrawImage(bitmap, _ImageRectF) Dim L1Font As New Font("Arrial Narrow", 8, FontStyle.Regular) Dim L2Font As New Font("Arrial Narrow", 8, FontStyle.Regular) Dim L3Font As New Font("Arrial Narrow", 10, FontStyle.Regular) e.Graphics.DrawString(Tbl(Inti)("Line1") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line1Left") & ""), Val(Tbl(Inti)("Line1Top") & "")) e.Graphics.DrawString(Tbl(Inti)("Line2") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line2Left") & ""), Val(Tbl(Inti)("Line2Top") & "")) e.Graphics.DrawString(Tbl(Inti)("Line3") & "", L3Font, Brushes.Black, Val(Tbl(Inti)("Line3Left") & ""), Val(Tbl(Inti)("Line3Top") & "")) 'Increase current char count curChar += chars If Inti = Tbl.Rows.Count - 1 Then e.HasMorePages = True Else e.HasMorePages = False End If Next
Что я уже пробовал:
For Inti = 0 To Tbl.Rows.Count - 1 Dim _ImageRectF As New RectangleF _ImageRectF.Width = 100 _ImageRectF.Height = 30 _ImageRectF.X = Tbl(Inti)("ImageLeft") _ImageRectF.Y = Tbl(Inti)("ImageTop") Dim stream As New System.IO.MemoryStream() Dim _image As Byte() = DirectCast(Tbl(Inti)("ImageToPrint"), Byte()) stream.Write(_image, 0, _image.Length) Dim bitmap As New Bitmap(stream) e.Graphics.DrawImage(bitmap, _ImageRectF) Dim L1Font As New Font("Arrial Narrow", 8, FontStyle.Regular) Dim L2Font As New Font("Arrial Narrow", 8, FontStyle.Regular) Dim L3Font As New Font("Arrial Narrow", 10, FontStyle.Regular) e.Graphics.DrawString(Tbl(Inti)("Line1") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line1Left") & ""), Val(Tbl(Inti)("Line1Top") & "")) e.Graphics.DrawString(Tbl(Inti)("Line2") & "", L1Font, Brushes.Black, Val(Tbl(Inti)("Line2Left") & ""), Val(Tbl(Inti)("Line2Top") & "")) e.Graphics.DrawString(Tbl(Inti)("Line3") & "", L3Font, Brushes.Black, Val(Tbl(Inti)("Line3Left") & ""), Val(Tbl(Inti)("Line3Top") & "")) 'Increase current char count curChar += chars If Inti = Tbl.Rows.Count - 1 Then e.HasMorePages = True Else e.HasMorePages = False End If Next
Richard MacCutchan
Размещение двух блоков одного и того же кода без объяснения вашей проблемы не даст вам ответа.