By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,283 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,283 IT Pros & Developers. It's quick & easy.

Changing default printer.....

P: n/a
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
Feb 9 '06 #1
Share this Question
Share on Google+
4 Replies


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

Feb 9 '06 #2

P: n/a
Sorry I forgot to mention. It is an automated program. No manual
intervention.
-Pete
"jvb" <go*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Try opening a PrintDialog box and setting it's return value equal to
the printer that the user selects.

Feb 9 '06 #3

P: n/a
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.
Feb 10 '06 #4

P: n/a
See my article of March 2005 at http://emoreau.s2i.com/

--
HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://emoreau.s2i.com/

"Pete Smith" <Pe*********@hotmail.com> wrote in message
news:OY**************@TK2MSFTNGP15.phx.gbl...
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

Feb 11 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.