ho fatto una ricerca sull'msdn del .net e ho trovato il metodo per stampare.
Dunque, ho dichiarato una variabile stringa "strDoc" nella quale ho memorizzato il valore delle textbox, uno per ogni riga.
"C:\App.txt" = path + nome del file che ho creato come appoggio per la stampa.
codice:
Imports System.IO
Imports System.Drawing.Printing
Public Class Form3
Private printFont As Font
Private streamToPrint As StreamReader
Private Shared filePath As String
' Print the file.
Private Sub Printing()
Try
streamToPrint = New StreamReader("C:\App.txt")
Try
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf pd_PrintPage
' Print the document.
pd.Print()
Finally
streamToPrint.Close()
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
' The PrintPage event is raised for each page _
to be printed.
Private Sub pd_PrintPage(ByVal sender As Object, _
ByVal ev As PrintPageEventArgs)
Dim linesPerPage As Single = 0
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
' Calculate the number of lines per page.
linesPerPage = _
ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics)
' Iterate over the file, printing each line.
While count < linesPerPage
line = streamToPrint.ReadLine()
If line Is Nothing Then
Exit While
End If
yPos = _
topMargin + count * printFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString(line, printFont, Brushes.Black, _
leftMargin, yPos, New StringFormat())
count += 1
End While
' If more lines exist, print another page.
If Not (line Is Nothing) Then
ev.HasMorePages = True
Else
ev.HasMorePages = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim fFile As StreamWriter
Dim strDoc As String =""
strDoc = TextBox1.Text + vbCrLf
strDoc = strDoc + TextBox2.Text + vbCrLf
strDoc = strDoc + TextBox3.Text + vbCrLf
strDoc = strDoc + TextBox4.Text + vbCrLf
strDoc = strDoc + TextBox5.Text + vbCrLf
strDoc = strDoc + TextBox6.Text + vbCrLf
strDoc = strDoc + TextBox7.Text + vbCrLf
strDoc = strDoc + TextBox8.Text + vbCrLf
strDoc = strDoc + TextBox9.Text + vbCrLf
strDoc = strDoc + TextBox10.Text + vbCrLf
fFile = File.CreateText("C:\App.txt")
fFile.WriteLine(strDoc)
fFile.Close()
Printing()
File.Delete("C:\App.txt")
End Sub
End Class
è abbastanza semplice da comprendere, studiatelo un po' e magari adattalo alle tue esigenze.
Buon lavoro! 