Private Sub docPrint_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) _
Handles docPrint.PrintPage
e.Graphics.DrawLine(New Pen(Color.Black, 2), 60, 90, 720, 90)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 60, 93, 720, 93)
Dim strDisplay As String = "Georgetown Dry Cleaner"
Dim fntString As System.Drawing.Font = _
New Font("Times New Roman", 28, _
FontStyle.Bold)
e.Graphics.DrawString(strDisplay, fntString, _
Brushes.Black, 120, 100)
strDisplay = "Customer Cleaning Order"
fntString = New System.Drawing.Font("Times New Roman", 18, _
FontStyle.Bold)
e.Graphics.DrawString(strDisplay, fntString, _
Brushes.Black, 220, 150)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 60, 184, 720, 184)
e.Graphics.DrawLine(New Pen(Color.Black, 2), 60, 188, 720, 188)
fntString = New System.Drawing.Font("Times New Roman", 12, _
FontStyle.Bold)
e.Graphics.DrawString("", fntString, _
Brushes.Black, 80, 200)
fntString = New System.Drawing.Font("Times New Roman", 12, _
FontStyle.Bold)
e.Graphics.DrawString("Customer Identification: ", fntString, _
Brushes.Black, 100, 220)
fntString = New System.Drawing.Font("Times New Roman", 12, _
FontStyle.Regular)
e.Graphics.DrawString(txtCustomerName.Text & " - " & _
txtCustomerPhone.Text, fntString, _
Brushes.Black, 300, 220)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 100, 240, 700, 240)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString("Date Left: ", fntString, _
Brushes.Black, 100, 260)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(dtpDateLeft.Value.ToString("D"), fntString, _
Brushes.Black, 300, 260)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 100, 280, 700, 280)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString("Time Left: ", fntString, _
Brushes.Black, 500, 260)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(dtpTimeLeft.Value.ToString("t"), fntString, _
Brushes.Black, 620, 260)
fntString = New System.Drawing.Font("Times New Roman", _
12, FontStyle.Bold)
e.Graphics.DrawString("Date Expected: ", fntString, _
Brushes.Black, 100, 300)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(dtpDateExpected.Value.ToString("D"), _
fntString, Brushes.Black, 300, 300)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString("Time Expected: ", fntString, _
Brushes.Black, 500, 300)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(dtpTimeExpected.Value.ToString("t"), _
fntString, Brushes.Black, 620, 300)
e.Graphics.DrawLine(New Pen(Color.Black, 2), 100, 320, 700, 320)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString("Item Type", _
fntString, Brushes.Black, 140, 350)
e.Graphics.DrawString("Unit Price", _
fntString, Brushes.Black, 300, 350)
e.Graphics.DrawString("Quantity", _
fntString, Brushes.Black, 405, 350)
e.Graphics.DrawString("Sub-Total", _
fntString, Brushes.Black, 500, 350)
e.Graphics.DrawLine(New Pen(Color.Black, 2), 140, 370, 640, 370)
Dim fmtString As StringFormat = New StringFormat
fmtString.Alignment = StringAlignment.Far
e.Graphics.DrawString("Shirts", _
fntString, Brushes.Black, 150, 380)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPriceShirts.Text, fntString, _
Brushes.Black, 350, 380, fmtString)
e.Graphics.DrawString(txtQuantityShirts.Text, fntString, _
Brushes.Black, 440, 380, fmtString)
e.Graphics.DrawString(txtSubTotalShirts.Text, fntString, _
Brushes.Black, 550, 380, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 140, 400, 640, 400)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString("Pants", _
fntString, Brushes.Black, 150, 410)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPricePants.Text, fntString, _
Brushes.Black, 350, 410, fmtString)
e.Graphics.DrawString(txtQuantityPants.Text, fntString, _
Brushes.Black, 440, 410, fmtString)
e.Graphics.DrawString(txtSubTotalPants.Text, fntString, _
Brushes.Black, 550, 410, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 140, 430, 640, 430)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString(cbxNameItem1.Text, _
fntString, Brushes.Black, 150, 440)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPriceItem1.Text, fntString, _
Brushes.Black, 350, 440, fmtString)
e.Graphics.DrawString(txtQuantityItem1.Text, fntString, _
Brushes.Black, 440, 440, fmtString)
e.Graphics.DrawString(txtSubTotalItem1.Text, fntString, _
Brushes.Black, 550, 440, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 140, 460, 640, 460)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString(cbxNameItem2.Text, _
fntString, Brushes.Black, 150, 470)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPriceItem2.Text, fntString, _
Brushes.Black, 350, 470, fmtString)
e.Graphics.DrawString(txtQuantityItem2.Text, fntString, _
Brushes.Black, 440, 470, fmtString)
e.Graphics.DrawString(txtSubTotalItem2.Text, fntString, _
Brushes.Black, 550, 470, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 140, 490, 640, 490)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString(cbxNameItem3.Text, _
fntString, Brushes.Black, 150, 500)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPriceItem3.Text, fntString, _
Brushes.Black, 350, 500, fmtString)
e.Graphics.DrawString(txtQuantityItem3.Text, fntString, _
Brushes.Black, 440, 500, fmtString)
e.Graphics.DrawString(txtSubTotalItem3.Text, fntString, _
Brushes.Black, 550, 500, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), 140, 520, 640, 520)
fntString = New Font("Times New Roman", 12, FontStyle.Bold)
e.Graphics.DrawString(cbxNameItem4.Text, _
fntString, Brushes.Black, 150, 530)
fntString = New Font("Times New Roman", 12, FontStyle.Regular)
e.Graphics.DrawString(txtUnitPriceItem4.Text, fntString, _
Brushes.Black, 350, 530, fmtString)
e.Graphics.DrawString(txtQuantityItem4.Text, fntString, _
Brushes.Black, 440, 530, fmtString)
e.Graphics.DrawString(txtSubTotalItem4.Text, fntString, _
Brushes.Black, 550, 530, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 2), 140, 550, 640, 550)
fntString = New System.Drawing.Font("Times New Roman", 12, _
FontStyle.Bold)
e.Graphics.DrawString("Order Summary", fntString, _
Brushes.Black, 260, 600)
e.Graphics.DrawLine(New Pen(Color.Black, 2), 220, 620, 560, 620)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Bold)
e.Graphics.DrawString("Cleaning Total:", fntString, _
Brushes.Black, 260, 630)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Regular)
e.Graphics.DrawString(txtCleaningTotal.Text, fntString, _
Brushes.Black, 440, 630, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), _
220, 650, 520, 650)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Bold)
e.Graphics.DrawString("Tax Rate:", fntString, _
Brushes.Black, 260, 660)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Regular)
e.Graphics.DrawString(txtTaxRate.Text, fntString, _
Brushes.Black, 440, 660, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), _
220, 680, 520, 680)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Bold)
e.Graphics.DrawString("Tax Amount:", fntString, _
Brushes.Black, 260, 690)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Regular)
e.Graphics.DrawString(txtTaxAmount.Text, fntString, _
Brushes.Black, 440, 690, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 1), _
220, 710, 520, 710)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Bold)
e.Graphics.DrawString("Net Price:", fntString, _
Brushes.Black, 260, 720)
fntString = New System.Drawing.Font("Times New Roman", _
10, FontStyle.Regular)
e.Graphics.DrawString(txtNetPrice.Text, fntString, _
Brushes.Black, 440, 720, fmtString)
e.Graphics.DrawLine(New Pen(Color.Black, 2), _
200, 740, 560, 740)
End Sub
|