Author Topic: Setting Parity via combo box drop down list in VB 2010  (Read 10295 times)

titan2020

  • Member
  • ***
  • Posts: 7
Setting Parity via combo box drop down list in VB 2010
« on: October 07, 2011, 09:59:11 am »
Hello,

I'm writing an application that will use the SerialPort class. It will have a com port setup form that will have combo boxes for the port properties. Setting the PortName, BaudRate and DataBits are no problem. How can I set the SerialPort.Parity, SerialPort.StopBits, and SerialPort.Handshake to the selected values in their respective combo boxes.

Thank you,

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Setting Parity via combo box drop down list in VB 2010
« Reply #1 on: October 07, 2011, 10:33:37 am »
Use your existing combobox code as a model. Replace DataBits with Parity, StopBits, or Handshake and edit the combobox data as appropriate. My ComPortTerminal application has a Handshake example.

http://www.lvr.com/serport.htm#my_example_code

Jan

titan2020

  • Member
  • ***
  • Posts: 7
Re: Setting Parity via combo box drop down list in VB 2010
« Reply #2 on: October 07, 2011, 03:34:36 pm »
Thank you. I'm up and running