Hi

I have problem reading the serial port, I'm using the

Private Sub MSComm_OnComm ()
Select Case MSComm1.CommEvent
Case comEvReceive ' Recibido nº Threshold de
caracter = mscomm1.input
y = y + 1
if y = 15 then
rxcom = rxcom & vbcr
else
rxcom = rxcom & caracter & ","
label1.caption = rxcom
save(rxcom) ' I call a subroutine where I write the string, and initiate y = 0
End Select
End Sub

As you can see I have an array where I want a csv file for 15 bytes each time that I write them in a file.

d1,d2,.....,d14,d15
.
.
.
d1,d2,.....,d14,d15

I have rthreshold = 1 and settings 9600,n,8,1

The thing is that I receive all the string If I dont do anything, If I put the mouse in close buttom with out press I lose 2 Bytes, If I put the mouse around the bar winidows, where you change between programs, I lose 1 byte.

Can someone tell me what I need to do in order to get all the string.

Thank you in advance

Victor