whassan
Newbie level 1
I have a (weight Bridge measure machine) for Weight the big Car . it have a serial port .
.We enter data through serial port in vb code but it gives in text box unclear letters and numbers.
#%y;< YW
this is code I used:
Private Sub Form_Load()
With MSComm1
.CommPort = 1
.Handshaking = comRTSXOnXOff
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
.EOFEnable = True
.InputMode = comInputModeText
.InputLen = 0
End With
end sub
Private Sub MSComm1_OnComm()
Dim Buffer As String
If MSComm1.CommEvent = 2 Then
Buffer = Buffer & MSComm1.Input & Chr(11)
Buffer = StrConv(MSComm1.Input, vbUnicode)
Me.Text1 = Buffer
end if
end sub
I tried all the solution but it did not give a result.
Please if someone have a solution help me to solve it.
.We enter data through serial port in vb code but it gives in text box unclear letters and numbers.
#%y;< YW
this is code I used:
Private Sub Form_Load()
With MSComm1
.CommPort = 1
.Handshaking = comRTSXOnXOff
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.PortOpen = True
.EOFEnable = True
.InputMode = comInputModeText
.InputLen = 0
End With
end sub
Private Sub MSComm1_OnComm()
Dim Buffer As String
If MSComm1.CommEvent = 2 Then
Buffer = Buffer & MSComm1.Input & Chr(11)
Buffer = StrConv(MSComm1.Input, vbUnicode)
Me.Text1 = Buffer
end if
end sub
I tried all the solution but it did not give a result.
Please if someone have a solution help me to solve it.