Results 1 to 6 of 6

Thread: EnumPorts - Find the system's COM and/or LPT ports

Threaded View

  1. #1

    Thread Starter
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    EnumPorts - Find the system's COM and/or LPT ports

    The EnumPorts class will find the COM ports, LPT ports, or both. If a new device arrives or leaves the list of devices gets refreshed.

    The information you can retrieve is:

    • PortDescription
    • PortName
    • PortNumber
    • PortType


    These can be retrieved by index from 1 to Count or by key (PortName, e.g. "COM1:").

    Each refresh raises the Refresh event so you can update a menu, etc.


    Name:  sshot1.png
Views: 1591
Size:  2.7 KB

    Menu populated by demo's Form1


    Name:  sshot2.png
Views: 2158
Size:  3.2 KB

    Plugged in a USB serial IoT device. Got a Refresh event.
    Menu updated to show the current list


    Name:  sshot3.png
Views: 1498
Size:  2.0 KB

    Menu item clicked on, Form1 printed some of its info


    No special requirements, but Windows 2000 or newer is required. Only tested on Windows 10 1709.
    Attached Files Attached Files
    Last edited by dilettante; Feb 13th, 2018 at 01:23 PM. Reason: Updated to version 1.2

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