Hi all.
There is a byte variable as follow
which need to be called inCode:Dim Sendcmd() As Byte = { 0, 0, 0, 0 }
The question is how to change "0"s with a set of TrackBar controls changeable values?Code:SerialPort1.Write(Sendcmd, 0, Sendcmd.Lenght - 1)
What I tried and failed:
Code:Dim Sendcmd() As Byte = {CByte(TrackBar1.Value), CByte(TrackBar2.Value), CByte(TrackBar3.Value), CByte(TrackBar4.Value)}Code:Dim Sendcmd() As Byte = {(TrackBar1.Value).ToString, (TrackBar2.Value).ToString, (TrackBar3.Value).ToString, (TrackBar4.Value).ToString}





Reply With Quote
