This is what i have till now
I also want to print the readable text under the Barcode, but the distance between the barcode and the distance between the readable tekst is not equal so the readable tekst gets printed through the barcode,
Is there a way of preventing this? and how do I print a wmf image top center of the printed page ?
GreetZ,
Cire
[VB]
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim oControl As Control
Dim strPrint As String
Dim X As Integer = 20 *** X coordinate of the printed text
Dim Y As Integer = 200 *** Y Coordinate of the printed text
Dim OffSet As Integer
For Each oControl In Me.Controls
If oControl.Name <> "btnPrint" And oControl.Name <> "cboIndexSet" And oControl.Name <> "cboPatch" Then
If TypeOf oControl Is TextBox Then
strPrint = strPrint & "*" & oControl.Text & "*" & vbCrLf & vbCrLf
End If
If TypeOf oControl Is ComboBox Then
strPrint = strPrint & "*" & oControl.Text & "*" & vbCrLf & vbCrLf
End If
If TypeOf oControl Is DateTimePicker Then
strPrint = strPrint & "*" & oControl.Text & "*" & vbCrLf & vbCrLf
End If
End If
Next
e.Graphics.DrawString(strPrint, New Font("Free 3 of 9 Extended", 36, FontStyle.Regular), Brushes.Black, X, Y)
e.Graphics.DrawString(strPrint, New Font("Arial", 22, FontStyle.Regular), Brushes.Black, X, (Y + 40))
e.HasMorePages = False
End Sub
[/VB]