تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] يرجى المساعدة في تعديل كود الطباعة
#3
تفضل التعديل
PHP كود :
   Private Sub PrintDocument1_PrintPage(sender As ObjectAs Printing.PrintPageEventArgsHandles PrintDocument1.PrintPage

        Dim leftMagin 
As Integer e.MarginBounds.Left
        Dim topMagin 
As Integer e.MarginBounds.Top

        Dim cellFont 
As New Font("Arial"14)
 
       Dim cellForeColor As New SolidBrush(Color.Black)
 
       Dim cellBackColor As New SolidBrush(Color.WhiteSmoke)
 
       Dim cellBorderColor As New Pen(Brushes.Blue1)
 
       Dim cellSize As New Size(300100)


 
       Dim index As Integer 0

        For currentY 
0 To (Me.DataGridView1.Rows.Count 1) \ 2
            For currentX 
0 To 1

                Dim cellText 
As String =
 
                   "confirming QSO with" Me.DataGridView1.Rows(index).Cells(1).Value vbNewLine _
                    
"Call: " Me.DataGridView1.Rows(index).Cells(2).Value

                Dim cellPoint 
As New Point(leftMagin + (currentX cellSize.Width), topMagin + (currentY cellSize.Height))
 
               Dim cellRectangle As New Rectangle(cellPointcellSize)

 
               e.Graphics.FillRectangle(cellBackColorcellRectangle)

 
               e.Graphics.DrawString(cellTextcellFontcellForeColorcellRectangle)

 
               e.Graphics.DrawRectangle(cellBorderColorcellRectangle)

 
               index += 1
                If index 
Me.DataGridView1.Rows.Count - If(Me.DataGridView1.AllowUserToAddRows21Then Exit For

 
           Next
        Next

    End Sub 
الرد }}}
تم الشكر بواسطة: dubai.eig , dubai.eig


الردود في هذا الموضوع
RE: يرجى المساعدة في تعديل كود الطباعة - بواسطة abdualla - 09-04-17, 08:15 PM


التنقل السريع :


يقوم بقرائة الموضوع: