954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help with serial port....

hey can't seem to send and receive data...i followed an instruction from another site...but its not working...can u guys help me out..

Private Sub conn_button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles conn_button.Click
        LoginPanel.Hide()
        dport.Text = ComboBox1.SelectedItem
        drate.Text = ComboBox2.SelectedItem
        SerialPort1.PortName = ComboBox1.SelectedItem
        SerialPort1.BaudRate = ComboBox2.SelectedItem

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendButton.Click
        ListBox1.Items.Add(nameBox.Text & " : " & ChatBox.Text)
        ChatBox.Clear()
        ChatBox.Select()
        SerialPort1.Open()
        SerialPort1.Write(ChatBox.Text)
        SerialPort1.Close()

        SerialPort1.Open()
        ListBox1.Items.Add(SerialPort1.ReadChar())
        SerialPort1.Close()

    End Sub

    Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
        MsgBox("This is a software", MsgBoxStyle.OkOnly)

    End Sub

    Private Sub Dis_button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dis_button.Click
        LoginPanel.Show()
    End Sub


.

thanks guys...

gopi17
Junior Poster
100 posts since Sep 2008
Reputation Points: 18
Solved Threads: 3
 

this if vb.net sample

omoridi
Junior Poster in Training
72 posts since Sep 2009
Reputation Points: 10
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You