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
 

V_R

¯\_(ツ)_/¯
Moderator
Joined
Jan 31, 2005
Messages
13,572
Reaction score
1,888
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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top