Comm Port programming in VB.Net


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Comm Port programming in VB.Net

  1. #1
    Stephan Guest

    Comm Port programming in VB.Net


    Anyone know how to program the comm port in .NET? I used the MSCOMM control
    and API's in VB6, but can't seem to find any replacements in .NET.
    Maybe a Namespace perhaps?


  2. #2
    Patrick Steele [MVP] Guest

    Re: Comm Port programming in VB.Net

    In article <3cdb96db$1@10.1.10.29> (from Stephan <vb.@127.0.0.1>),
    >
    > Anyone know how to program the comm port in .NET? I used the MSCOMM control
    > and API's in VB6, but can't seem to find any replacements in .NET.
    > Maybe a Namespace perhaps?


    The .NET framework does not have any native support for serial (com)
    port access. Here's a few code samples that use PInvoke to access the
    serial port:

    http://www.gotdotnet.com/userfiles/L...rialStream.zip

    JustinIO
    http://www.nxys.com/justin/io.htm

    --
    Patrick Steele
    Microsoft .NET MVP

  3. #3
    Dick Grier Guest

    Re: Comm Port programming in VB.Net

    Hi,

    There is nothing "built-in." You can download NETComm.ocx from my homepage
    (completely free). I also have code examples in my book, see below,
    including a native VB.NET class for serial communications. 95% of this code
    uses Windows 32-bit communications API calls, but in a .NET class module;
    for example, reads and writes use the FileStream type, and method
    overloading is used to handle both binary and text data.

    --
    Richard Grier (Microsoft Visual Basic MVP)

    See www.hardandsoftware.net for contact information.

    Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
    Edition ISBN 1-890422-27-4 (391 pages) published February 2002.




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