CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2000
    Posts
    12

    Checking if printer is available

    Hi everyone,

    I'm trying to write a routine that
    finds out if a chosen printer
    (set printer = p) is available, e.g.
    if the printer is valid, switched on
    has enough paper etc.
    Has anyone any idea how to do this?
    I tried some of the WinAPI-functions
    but didn't quite succeed.
    Any help would be appreciated.

    Thanks in advance,

    A. Kempf


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Checking if printer is available

    you can query the printer in your system

    Dim X As Printer
    For Each X In Printers
    Debug.Print X.DeviceName
    Next

    hope this help

    cksiow
    http://vblib.virtualave.net - share our codes


  3. #3
    Join Date
    Dec 2000
    Posts
    12

    Re: Checking if printer is available

    Thanks,

    but the problem is not to find out
    which printers are available in the
    system. If you choose one of the
    printers in the printers collection
    you don't know if this particular
    printer is plugged in or if it's
    switched on etc. The problem is
    when you start printing on a printer
    which is not ready for printing
    you won't get an error immediately.
    In the worst case you'll never get
    an error message.
    If you got any other ideas please
    let me know and again thanks.

    A. Kempf


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

Featured