DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Printer Questions

  1. #1
    Paul Guest

    Printer Questions


    Hi All,

    Does anyone know how can i check if "LPT1" is available ? is open ? and
    how can i check if my printer is switched to power on and if it's empty of
    paper ? ...

    Thx in advance
    Paul


  2. #2
    Karl E. Peterson Guest

    Re: Printer Questions

    Hi Paul --

    > Does anyone know how can i check if "LPT1" is available ? is open ? and


    Well, you could iterate the Printers collection, and see what ports are in use:

    Dim prn As Printer
    For Each prn In Printers
    Debug.Print prn.Port
    Next prn

    > how can i check if my printer is switched to power on and if it's empty of
    > paper ? ...


    You can't, directly. You can only obtain what your printer has told Windows. See
    the PrnInfo.zip sample on http://www.mvps.org/vb for lots of clues.

    Later... Karl
    --
    [Microsoft Basic: 1976-2001, RIP]


  3. #3
    Karl E. Peterson Guest

    Re: Printer Questions

    Hi Paul --

    > Does anyone know how can i check if "LPT1" is available ? is open ? and


    Well, you could iterate the Printers collection, and see what ports are in use:

    Dim prn As Printer
    For Each prn In Printers
    Debug.Print prn.Port
    Next prn

    > how can i check if my printer is switched to power on and if it's empty of
    > paper ? ...


    You can't, directly. You can only obtain what your printer has told Windows. See
    the PrnInfo.zip sample on http://www.mvps.org/vb for lots of clues.

    Later... Karl
    --
    [Microsoft Basic: 1976-2001, RIP]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center