mscomm control in vb.net issue

Joined
Jul 12, 2012
Messages
1
Reaction score
0
hello

iam using mscomm control in vb.net , i read the data in the length of bytes , actually data showing is null , I declared the dim rbuf as string , while event is raising rbuf it shows null,how to resolve this problem,
i sent my code in the mscommcontrol event code it is in below




Private Sub AxMSComm1_OnComm(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxMSComm1.OnComm

Select Case AxMSComm1.CommEvent

Case MSCommLib.OnCommConstants.comEvReceive
rbuf = Asc(rbuf & AxMSComm1.Input)
Label22.Text = Trim(rbuf )
Label14.Text = Len(rbuf )

If Len(rbuf )= 6 Then writetofile(rbuf )
eventcount = eventcount + 1
Label15.Text = eventcount

End Select
End Sub





Thanks
 
I've split this thread off from the one you posted in as its always better to start a new one and not hijack someone else's. :)
 
Back
Top