Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Detecting the Parallel port using VB.NET2003 Window Form Application

Detecting the Parallel port using VB.NET2003 Window Form Application

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestiondatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    drexler_kk
    wrote on last edited by
    #1

    Hello all, I'm trying to help my sister do a simple window form application here for her grocery shop. I'm using Visual Studio .NET 2003 to create a Point Of Sales System for her shop.It is connected with MySQL 5.0 Database. I'm trying to doing a system planning and researching about this coding here. Anyone can provide me some information or sample how can I detect a parallel receipt printer or barcode printer using VB.NET? I need this Window Form Application to detect the receipt printer,if the receipt printer is not turning on or plug into the workstation,it will prompup and request the user to check it. Hope someone can help me on this problem. Thanks for reading. Regards Drexler

    C 1 Reply Last reply
    0
    • D drexler_kk

      Hello all, I'm trying to help my sister do a simple window form application here for her grocery shop. I'm using Visual Studio .NET 2003 to create a Point Of Sales System for her shop.It is connected with MySQL 5.0 Database. I'm trying to doing a system planning and researching about this coding here. Anyone can provide me some information or sample how can I detect a parallel receipt printer or barcode printer using VB.NET? I need this Window Form Application to detect the receipt printer,if the receipt printer is not turning on or plug into the workstation,it will prompup and request the user to check it. Hope someone can help me on this problem. Thanks for reading. Regards Drexler

      C Offline
      C Offline
      Chinners
      wrote on last edited by
      #2

      It is possible to detect if a device is plugged into the LPT port, but not natively though VB.NET. I have been doing something similar using a free DLL called "IO.DLL", which gives you direct access to the ports required to do what you are wanting. http://www.geekhideout.com/iodll.shtml[^] To see if the printer is availiable, you need to query port &h379 (LPT1 Control Port), and I think it is the second topmost bit (&h40) that says if the printer is attached and ready or not. I cant be much more help than this I'm afraid, but it should have some real good pointers to get you going.

      modified on Friday, July 11, 2008 5:31 AM

      D 1 Reply Last reply
      0
      • C Chinners

        It is possible to detect if a device is plugged into the LPT port, but not natively though VB.NET. I have been doing something similar using a free DLL called "IO.DLL", which gives you direct access to the ports required to do what you are wanting. http://www.geekhideout.com/iodll.shtml[^] To see if the printer is availiable, you need to query port &h379 (LPT1 Control Port), and I think it is the second topmost bit (&h40) that says if the printer is attached and ready or not. I cant be much more help than this I'm afraid, but it should have some real good pointers to get you going.

        modified on Friday, July 11, 2008 5:31 AM

        D Offline
        D Offline
        drexler_kk
        wrote on last edited by
        #3

        Sorry,I still can't figure out how should do this detection for my receipt printer and barcode printer here. Anyone can give me further detail or sample for the above code? Thanks for reading. Regards Drex

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups