VS Express 2005, VB and SerialPort

I have started to attempt to build a piece of code using VB which will use SerialPort to communicate with another pc connected via COM1 using hyperterminal.

So far I have no luck in attempting to compile my little VB form with the Serialport code inside, keep getting loads of errors.

What/where is the namespace required to allow serialport to be accessed, I have looked in System.IO but it doesen't have the .ports.SerialPort options available. I need to have something added to get this to work.

Help anyone



Answer this question

VS Express 2005, VB and SerialPort

  • oguime

    Thanks guys, problem was I had the earlier .Net Framework 1.xxx version from VS Studio 2003 and not 2.xxx as is required to get access to SerialPort and components etc. So I couldn't get intellisense to list system.ports.io.SerialPort as an option. Thick or what


  • Ron Wright

    Thanks .

    I will chew on this and see if I can make heads or tales of it.



  • Jeremiorama

  • Jeff Agent

    I joined the fourm to get the same info on serial ports.

    I was able to drag it into the form but do not know how to write to text box or send the data to display into my text area.

    I use hyper termainal now but want a custom App, to pull in Gifs and sub the ascii text.

    Any Help

    Thanks, PS: I am brand new to Visual Basic (all editions)



  • bieblsoft

    I'm so glad I found your reply on serial port. I am hoping you may be able to point me to where I could find more tutorial on serial port usage such as example code or something. I am new to Visual Basic Express 2005 so I am a little lost though I am taking an online class to learn it. Thanks in advance for anything you can supply.
  • meher666

    I believe it's System.IO.Ports and there is a SerialPort class under that if I'm not mistaken.

  • Chancetribe

    Lydon is correct, the System.IO.Ports.SerialPort class is defined in the System assembly.

    If you want to use it on a form, you should be able to find it under the "Components" tab in the toolbox and drag it onto your form.

    You can also use "My" to access serial ports:

    My.Computer.Ports.OpenSerialPort

    Best regards,
    Johan Stenberg



  • VS Express 2005, VB and SerialPort