Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

Changing default printer.....

47 vues
Accéder directement au premier message non lu

Pete Smith

non lue,
9 févr. 2006, 12:34:5309/02/2006
à
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


jvb

non lue,
9 févr. 2006, 13:10:0109/02/2006
à
Try opening a PrintDialog box and setting it's return value equal to
the printer that the user selects.

Pete Smith

non lue,
9 févr. 2006, 14:04:3209/02/2006
à
Sorry I forgot to mention. It is an automated program. No manual
intervention.
-Pete


"jvb" <gom...@gmail.com> wrote in message
news:1139508601.3...@z14g2000cwz.googlegroups.com...

Cerebrus99

non lue,
6 févr. 2006, 16:12:2206/02/2006
à
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.


Eric Moreau

non lue,
11 févr. 2006, 11:22:5411/02/2006
à
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" <PeteS...@hotmail.com> wrote in message
news:OYmI37ZL...@TK2MSFTNGP15.phx.gbl...

romalynta...@gmail.com

non lue,
10 juil. 2012, 03:02:2110/07/2012
à
On Friday, February 10, 2006 1:34:53 AM UTC+8, Pete Smith wrote:
> 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 &amp; .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
0 nouveau message