On Jul 1, 2:59 pm, kronec...@yahoo.co.uk wrote:
I found this code which may be VB6 but I don't know
' Shut down the Comm port event processing and timer
Timer1.Enabled = False
Comm1.RThreshold = 0
What is the equivalent in VB.Net? I have the serial port working fine
and cannot find the above timer or Rthreshold.
K.
Actually I got Rthreshold ok
If SerialPort1.IsOpen Then
SerialPort1.Close()
End If
Try
With SerialPort1
.PortName = cboCommPorts.Text
.BaudRate = 4800
.Parity = IO.Ports.Parity.None
.DataBits = 8
.StopBits = IO.Ports.StopBits.One
.Handshake = IO.Ports.Handshake.XOnXOff
.ReceivedBytesThreshold = 0
End With
SerialPort1.Open()
lblMessage.Text = SerialPort1.PortName & " connected"
cmdDisconnect.Enabled = True
cmdConnect.Enabled = False
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Still confused baout the timer though....
K.