Here are two approaches to print a form in http://vb.net/:
1) Using PrintDocument, PrintDialog components
.NET Framework provides excellent support for printing documents.
PrintDocument Component:
In .NET Framework, a printed document is represented by the PrintDocument component. The PrintDocument object encapsulates all the information needed to print a page. It handles the events and operations of printing.
PrintDialog Component:
To print a document, you need to set the PrintDialogās Document property to the PrintDocument object, and use the PrintDocument object's Print method. To send content to the printer, you must handle this PrintDocument_PrintPage event to render the content.
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
Code sample: How to use PrintDocument component to Print multiline and scrollable TextBox in http://vb.net/.
http://social.msdn.microsoft.com/Forums/en-US/vbpowerpacks/thread/2ad34554-e989-4ffa-8e1f-ccea1f00c99d
Some tutorials:
Article: Printing feature in .NET Framework
http://www.startvbdotnet.com/controls/printdialog.aspx
Windows Forms Printing
http://www.syncfusion.com/faq/windowsforms/faq_c55c.aspx#q491q
How to print the content of RichTextBox using Visual Basic .NET?
http://support.microsoft.com/kb/811401
2) Using PrintForm component in Visual Basic Power Packs
The PrintForm component is designed to bring back the ability to easily print a Windows Form. This makes it possible to layout the Windows Form exactly as you want and also allows you to print the form as a quick report.
Microsoft Visual Basic Power Packs 3.0 Download
http://msdn.microsoft.com/en-us/vbasic/bb735936.aspx
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
hope this will help u