Detecting the Parallel port using VB.NET2003 Window Form Application
-
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
-
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
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
-
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
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