5
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by slavedogg
0

I also want the same thing. I have just made a"Clothing Design" for a school assignment, and to get extra marks i need it so it will print out the full page.

Thanks
Chris

0

THis will print a label it might help guide you in the rignt direction.

''' at the very top of the form
Imports System.Drawing.Printing
''' new sub procedure
Private Sub printtext(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawString(lblQ2.Text, New Font("arial", 11, FontStyle.Regular), Brushes.Black, 120, 120)
ev.HasMorePages = False
End Sub
''' button event
Private Sub btnQ2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQ2.Click
Try
Dim printdoc As New PrintDocument
AddHandler printdoc.PrintPage, AddressOf Me.printtext
printdoc.Print()
Catch ex As Exception
MessageBox.Show("Sorry there is a problem printing", ex.ToString())
End Try
End Sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.