Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing default printer.....

47 views
Skip to first unread message

Pete Smith

unread,
Feb 9, 2006, 12:34:53 PM2/9/06
to
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

unread,
Feb 9, 2006, 1:10:01 PM2/9/06
to
Try opening a PrintDialog box and setting it's return value equal to
the printer that the user selects.

Pete Smith

unread,
Feb 9, 2006, 2:04:32 PM2/9/06
to
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

unread,
Feb 6, 2006, 4:12:22 PM2/6/06
to
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

unread,
Feb 11, 2006, 11:22:54 AM2/11/06
to
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

unread,
Jul 10, 2012, 3:02:21 AM7/10/12
to
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 new messages