Results 1 to 4 of 4

Thread: How to keep last used printer as a default printer

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    433

    How to keep last used printer as a default printer

    I want want to keep last used printer?
    For example, current default printer is Printer A.
    I printed through printer B.
    When I print another one, it is printed through Printer A.
    I want to keep last used printer as a default printer.
    How do I do this?

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,398

    Re: How to keep last used printer as a default printer

    Possibly useful link:

    http://www.vbforums.com/showthread.p...inter-from-VB6

    Note:
    If this is not on your computer, but a user's computer, you may want to get the default printer setting, save it in your program, change it, print whatever needs to be printed, and then change the default printer back to whatever it was previously. Otherwise, the user may become annoyed at your program for changing the default printer.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: How to keep last used printer as a default printer

    I typically use an ini file where I store/load the printer info as needed rather than mess with the system default printer.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: How to keep last used printer as a default printer

    Be sure to allow for a printer not being there when you next run. Lots of networked printers come and go as well due to being shut off, network woes, etc.

    Probably better to present a dialog for printer selection with a previously-used printer selected (if currently available) by default in that dialog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width