C# codeusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace Demo
{
public partial class myForm : Form
{
//private int[] ReceiveData = new int[4];
//private int ReceiveDataIndex = 0;
string ReceiveData;
public myForm()
{
InitializeComponent();
}
private void myForm_Load(object sender, EventArgs e)
{
comboBoxPortName.SelectedIndex = 0;
comboBoxBaudRate.SelectedIndex = 5;
comboBoxParity.SelectedIndex = 0;
comboBoxDataBits.SelectedIndex = 0;
comboBoxStopBits.SelectedIndex = 0;
btnClose.Enabled