# MScomm ,vb6.0

Posted by 王廉 on June 09, 1999 at 20:21:17:

我用vb6.0 的MScomm 写通信软件，用方式，InputMode---1-ComInputModeBinary,来接收，
Select Case MSComm1.CommEvent
' Event messages.
Case comEvReceive
Dim Buffer As String
Buffer = MSComm1.Input
Dim c1 As String
Dim c2 As String
c1 = Left(Buffer, 1)
c2 = Right(Buffer, 1)
Text1.Text = Hex$(Asc(c1))
Text2.Text = Hex$(Asc(c2))
单片机上送过来的是十六进制的。 我接收的数据有误。

我把方式改为：InputMode---1-ComInputModetext,对静态的对的，动态的
Text1.Text = Hex$(Asc(c1))
以上句老出措

Follow Ups:

- 要用 byte array 小吴 19:15:37 6/11/99 (1)
  - Re: 璶&#12494; byte array 王廉 17:41:58 6/15/99 (0)