تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
طباعة كل محتويات الصورة بالاضافات الجديدة
#6
PHP كود :
Private Sub PrintDocument1_PrintPage(ByVal sender As System.ObjectByVal e As Printing.PrintPageEventArgsHandles PrintDocument1.PrintPage

    Dim recHeight 
As Integer e.PageSettings.PrintableArea.Height 4
    Dim recWidth 
As Integer e.PageSettings.PrintableArea.Width 3

    Dim i 
As Integer 1
    Dim img 
As Image Nothing

    Dim z 
As New Size(recWidthrecHeight)

 
   For y 0 To 3
        For x 
0 To 2

            If i 
1 Then img getCard(zPictureBox1.Image"Text1"Today.ToLongDateString)
 
           If i 2 Then img getCard(zPictureBox1.Image"Text2"Today.ToLongDateString)
 
           If i 3 Then img getCard(zPictureBox1.Image"Text3"Today.ToLongDateString)

 
           If i 4 Then img getCard(zPictureBox2.Image"Text4"Today.ToLongDateString)
 
           If i 5 Then img getCard(zPictureBox2.Image"Text5"Today.ToLongDateString)
 
           If i 6 Then img getCard(zPictureBox2.Image"Text6"Today.ToLongDateString)

 
           If i 7 Then img getCard(zPictureBox3.Image"Text7"Today.ToLongDateString)
 
           If i 8 Then img getCard(zPictureBox3.Image"Text8"Today.ToLongDateString)
 
           If i 9 Then img getCard(zPictureBox3.Image"Text9"Today.ToLongDateString)

 
           If i 10 Then img getCard(zPictureBox4.Image"Text10"Today.ToLongDateString)
 
           If i 11 Then img getCard(zPictureBox4.Image"Text11"Today.ToLongDateString)
 
           If i 12 Then img getCard(zPictureBox4.Image"Text12"Today.ToLongDateString)

 
           e.Graphics.DrawImage(img, New Point((recWidth), (recHeight)))

 
           i += 1

        Next
    Next

End Sub

Function getCard(ByVal z As SizeByVal img As ImageByVal t1 As StringByVal t2 As String) As Image
    Using b 
As New Bitmap(z.Widthz.Height)
 
       Using g As Graphics Graphics.FromImage(b)
 
           g.Clear(Color.White)

 
           g.DrawImage(img2030)

 
           g.DrawString(t1, New Font("Arial"10FontStyle.Bold), Brushes.Blue, New Point(3070))
 
           g.DrawString(t2, New Font("Arial"10FontStyle.Bold), Brushes.Brown, New Point(3090))

 
           Return b.Clone
 
       End Using
    End Using
End 
Function 
الرد }}}
تم الشكر بواسطة: sendbad100


الردود في هذا الموضوع
RE: طباعة كل محتويات الصورة بالاضافات الجديدة - بواسطة a.ahmed - 08-10-17, 12:35 PM


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


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