你可以判断接收字符的长度,比如当大于21个字符长度的时候接收
Do
Loop While MSComm1.InBufferCount < 21
然后在讲数据存入缓存
byte a = new byte[21]
a = MSComm1.Input;
你试试