Changing default printer.....

C

Cerebrus99

Hi Pete,

If there is no user intervention possible, You can use the
PrintDocument.PrinterSettings property, through which you can specify
several Printer settings.
---------------------------------------
Dim pd As New PrintDocument()

' Specify the name of the printer to use.
pd.PrinterSettings.PrinterName = MyPrinter

'Set the no. of copies to print
pd.PrinterSettings.Copies = 2

'Set the range of pages to print
pd.PrinterSettings.PrintRange = PrintRange.AllPages

If pd.PrinterSettings.IsValid then
pd.Print()
Else
MessageBox.Show("Printer is invalid.")
End If

---------------------------------------

If you don't know the names of the installed printers, you can get it from
the PrinterSettings.InstalledPrinters collection.

Regards,

Cerebrus.
 
P

Pete Smith

I am using the PrintDocument for my print application.

Currently it is printing to the default printer.

How to change to a different printer?

VB.Net 2003 & .Net Framework 1.1.

Thank you,

Pete
 
J

jvb

Try opening a PrintDialog box and setting it's return value equal to
the printer that the user selects.
 
P

Pete Smith

Sorry I forgot to mention. It is an automated program. No manual
intervention.
-Pete
 
R

romalyntaguinod.07

I am using the PrintDocument for my print application.

Currently it is printing to the default printer.

How to change to a different printer?

VB.Net 2003 & .Net Framework 1.1.

Thank you,

Pete

Thank you so much.. It's a big help for my project here in our company.. Be bless.. :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top