VB.Net code for Installing printers in the network.
Add namespace: System.Drawing.Printing.
Add Combo box Control: cbPrinterList
During the Page load: Copy the below code
For Each Printer As String In PrinterSettings.InstalledPrinters
cbPrinterList.Items.Add(Printer.ToString())
Next
Summary:
Imports System.Drawing.Printing
Imports System
Public Class PrinterList
Private Sub
PrinterList_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For Each
Printer As String In PrinterSettings.InstalledPrinters
cbPrinterList.Items.Add(Printer.ToString())
Next
cbPrinterList.Text = My.Settings.cbPrinter
End Sub
No comments:
Post a Comment