|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Changing default printer.....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 Try opening a PrintDialog box and setting it's return value equal to
the printer that the user selects. Sorry I forgot to mention. It is an automated program. No manual
intervention. -Pete Show quoteHide quote "jvb" <gome***@gmail.com> wrote in message news:1139508601.387167.122930@z14g2000cwz.googlegroups.com... > Try opening a PrintDialog box and setting it's return value equal to > the printer that the user selects. > 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. See my article of March 2005 at http://emoreau.s2i.com/
-- Show quoteHide quoteHTH Éric Moreau, MCSD, Visual Developer - Visual Basic MVP Conseiller Principal / Senior Consultant Concept S2i inc. (www.s2i.com) http://emoreau.s2i.com/ "Pete Smith" <PeteSmit***@hotmail.com> wrote in message news:OYmI37ZLGHA.2276@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 > >
Changing a richtextbox's colour!
Conversion question Vanishing Declarations Q: Message Box graphics .NET PDF toolkit that can compress images in PDF files..? sort treeview VS2005 Standard vs. VS2003.Net Academic what is the meaning of this error message? Windows Explorer Integration Framework question |
|||||||||||||||||||||||