jazzmaster111
Programmer
Hi
I'm printing a string but server is who sends the printing, not the client.
How can I do in order the client sends the printing?
This is my code:
Private printFont As Font
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
pd.Print()
Finally
End Try
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
Dim yPos As Single = 0
Dim count As Integer = 0
Dim leftMargin As Single = ev.MarginBounds.Left
Dim topMargin As Single = ev.MarginBounds.Top
Dim line As String = Nothing
yPos = topMargin + count * printFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString("aun funciona", printFont, Brushes.Black, leftMargin, yPos, New StringFormat())
End Sub
Thanks!!
I'm printing a string but server is who sends the printing, not the client.
How can I do in order the client sends the printing?
This is my code:
Private printFont As Font
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
pd.Print()
Finally
End Try
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
Dim yPos As Single = 0
Dim count As Integer = 0
Dim leftMargin As Single = ev.MarginBounds.Left
Dim topMargin As Single = ev.MarginBounds.Top
Dim line As String = Nothing
yPos = topMargin + count * printFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString("aun funciona", printFont, Brushes.Black, leftMargin, yPos, New StringFormat())
End Sub
Thanks!!