Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing a page

Status
Not open for further replies.

jazzmaster111

Programmer
May 2, 2005
25
0
0
MX
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!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top