Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSend a printout directly to a specific printer in Visual Basic .NET
DescriptionThis example shows how to Send a printout directly to a specific printer in Visual Basic .NET.
Keywordsprinting, printers, send to printer, Visual Basic .NET, VB.NET
CategoriesGraphics, 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.
 
 
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated