Imports System Imports System.IO.Ports Public Class Form2 Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try SerialPort1 = New SerialPort("COM1", 9600, Parity.None, 8, StopBits.One) SerialPort1.Open() Catch ex As System.IO.IOException TextBox2.Text = "IO exception " + ex.Message End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try TextBox1.Text = "" TextBox1.Text = SerialPort1.ReadChar() Catch ex As System.IO.IOException TextBox2.Text = ex.Message End Try End Sub End Class
Hi all, I'm trying to read data from the serial port of the pocket pc phone but i have problem reading it. I get stuck/ freeze when i click the Button1 button.
My pocket pc phone does not have a physical serial port on it. It is connected with a designated serial cable (1 end to connect with the pocket pc, the other end is d male 9-pin serial port) and the serial port from the designated serial cable is attached with a null modem to a microcontroller.
Is there any error i make in my coding? Urgent help please..