Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.PrintDialog1.PrinterSettings = Me.PrintDocument1.PrinterSettings If (Me.PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then Me.PrintDocument1.PrinterSettings = Me.PrintDialog1.PrinterSettings Me.PrintDocument1.Print() End If End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage MsgBox("Going to print") End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)