742
社区成员
发帖
与我相关
我的任务
分享
Private Sub MSComm1_OnComm()
On Error Resume Next
Dim CH, ST As String
Dim LC As Integer
Dim i As Integer
Dim phone As String
Select Case MSComm1.CommEvent
'接收到Rthreshold个字符
Case comEvReceive
combuf = combuf + MSComm1.Input
Do
LC = InStr(1, combuf, Chr(10))
If LC = 0 Then Exit Do
comlin = Left(combuf, LC)
combuf = Mid(combuf, LC + 1)
CH = Left(comlin, 1)
'Debug.Print i & COMLIN
If " " < CH And CH < Chr(127) Then
If IsNumeric(comlin) = True And Len(comlin) > 5 Then
If doUnLock() = False Then Exit Sub
phone = Replace(Replace(comlin, Chr(10), ""), Chr(13), "")
SetStatus "电话......,号码:" & phone & ",来电时间:" & Now()
Dim frm As New frmCenter
frm.Show
frm.Search phone
Set frm = Nothing
End If
End If
Loop
End Select
End Sub