Vb.net print code in a form

Posted by Jopito under VB.NET on 5/29/2013 | Points: 10 | Views : 5665 | Status : [Member] | Replies : 3
I have a form which i need to print the details entered,help me out with the code to print

Mark as answer if satisfied


Responses

Posted by: Satyapriyanayak on: 5/29/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/72b5a038-912d-4455-929d-89eeb9984d7c
http://www.developerfusion.com/code/5232/printing-with-formatting-in-vbnet/

If this post helps you mark it as answer
Thanks

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saranya Boopathi on: 5/30/2013 [Member] Starter | Points: 25

Up
0
Down
Two approaches to print a form in VB.NET:

Private Sub buttonPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Dim printDialog1 As PrintDialog = New PrintDialog
printDialog1.Document = printDocument1
Dim result As DialogResult = printDialog1.ShowDialog
If (result = DialogResult.OK) Then
printDocument1.Print()
End If
End Sub




Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 

Handles Button1.Click
PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
End Sub




Saranya Boopathi

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Annaharris on: 5/30/2013 [Member] Starter | Points: 25

Up
0
Down
Checkout the link that I have mentioned below as that will guide you to print your reports. http://simpleprogrammingexamples.blogspot.in/2009/02/printing-in-c-2_18.html

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response