Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
Dim PortList As New List(Of IO.Ports.SerialPort) While x < rc PortList.Add(New IO.Ports.SerialPort) PortList(x).PortName = dset.Tables(0).Rows(x)("portname") PortList(x).ReadTimeout = 1500 Try PortList(x).Open() For Each cCont As Label In gbStations.Controls If cCont.Name = "Label" & CStr(x + 1) Then cCont.BackColor = Color.Green End If Next cCont Catch ex As Exception MsgBox(ex.Message) For Each cCont As Label In gbStations.Controls If cCont.Name = "Label" & CStr(x + 1) Then cCont.BackColor = Color.Red End If Next cCont End Try x = x + 1
Public Sub getData (ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived, SerialPort2.DataReceived, SerialPort3.DataReceived etc.
|VB.NET - how to detect if a file is being used by another process||9||37|
|How do i connect MySQL on Visual Studio||3||26|
|Response back from stored procedure||6||32|
|I need C# converted to VB.net||1||33|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!