|
|
Title | Send a printout directly to a specific printer in Visual Basic .NET |
Description | This example shows how to Send a printout directly to a specific printer in Visual Basic .NET. |
Keywords | printing, printers, send to printer, Visual Basic .NET, VB.NET |
Categories | Graphics, VB.NET |
|
|
This program uses the following code to print directly to the printer named "Dell Photo AIO Printer 926."
|
|
' Print.
Private Sub btnPrint_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnPrint.Click
' Select the printer.
pdocSmiley.PrinterSettings.PrinterName = "Dell Photo AIO" & _
"Printer 926"
' Print.
pdocSmiley.Print()
End Sub
|
|
The code first sets the PrinterSettings object's PrinterName property to select the printer. It then calls the PrintDocument object's Print method to immediately send the printout to that printer.
|
|
|
|
|
|
|
|
|