Torna al Thread
Private Sub StampaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StampaToolStripMenuItem.Click
Try
If PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
PrintDocument1.DefaultPageSettings = PageSetupDialog1.PageSettings
PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
AddHandler PrintDocument1.PrintPage, AddressOf PrintDocument_PrintPage
PrintDocument1.DocumentName = "xxx"
PrintDocument1.Print()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub