Changing default printer.....

Discussion in 'Microsoft VB .NET' started by Cerebrus99, Feb 6, 2006.

  1. Cerebrus99

    Cerebrus99 Guest

    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.
     
    Cerebrus99, Feb 6, 2006
    #1
    1. Advertisements

  2. Cerebrus99

    Pete Smith Guest

    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
     
    Pete Smith, Feb 9, 2006
    #2
    1. Advertisements

  3. Cerebrus99

    jvb Guest

    Try opening a PrintDialog box and setting it's return value equal to
    the printer that the user selects.
     
    jvb, Feb 9, 2006
    #3
  4. Cerebrus99

    Pete Smith Guest

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


    "jvb" <> wrote in message
    news:...
    > Try opening a PrintDialog box and setting it's return value equal to
    > the printer that the user selects.
    >
     
    Pete Smith, Feb 9, 2006
    #4
  5. Cerebrus99

    Eric Moreau Guest

    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" <> wrote in message
    news:...
    >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
    >
    >
     
    Eric Moreau, Feb 11, 2006
    #5
  6. Cerebrus99

    Guest

    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
     
    , Jul 10, 2012
    #6
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick R

    Changing Default Printer Settings

    Rick R, Jul 13, 2004, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    587
    Rick R
    Jul 16, 2004
  2. Stephen

    Changing the default printer

    Stephen, Jul 27, 2004, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    173
    Stephen
    Jul 27, 2004
  3. Guest

    Changing default printer

    Guest, Jan 29, 2005, in forum: Microsoft VB .NET
    Replies:
    6
    Views:
    240
    Herfried K. Wagner [MVP]
    Jan 30, 2005
  4. Mike Fellows

    Changing the default printer

    Mike Fellows, Aug 5, 2005, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    173
    Mike Fellows
    Aug 5, 2005
  5. Guest

    Changing Printer's default paper

    Guest, Oct 4, 2006, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    191
    Guest
    Oct 8, 2006
Loading...

Share This Page