求助VB中MScomm 与手机通话问题(贴出代码)?

chineseProgram 2010-05-24 10:42:42
Private Sub Command1_Click() '拨打电话
If Text1.Text = "" Then
MsgBox "请输入电话号码!", vbQuestion, "提示信息"
Text1.SetFocus
End If

MSComm2.DTREnable = True
MSComm2.EOFEnable = True
MSComm2.RTSEnable = True
MSComm2.RThreshold = 1
MSComm2.SThreshold = 1
MSComm2.Handshaking = comNone
MSComm2.OutBufferSize = 1024


MSComm2.CommPort = 4 '设置通讯端口号
MSComm2.Settings = "19200,N,8,1" '设置波特率、奇偶校验、数据位、停止位参数
MSComm2.PortOpen = True
MSComm2.InputMode = comInputModeText
MSComm2.OutBufferCount = 0

MSComm2.Output = "ATDT" & Text1.Text & ";" & vbCr


End Sub



Private Sub MSComm2_OnComm()

Dim InBuff As String
Select Case MSComm2.CommEvent
Case comEvCD ' Change in the CD line.
MsgBox "1"
Case comEvCTS ' Change in the CTS line.
MsgBox "2"
Case comEvDSR ' Change in the DSR line.
MsgBox "3"
Case comEvRing ' Change in the Ring Indicator.
MsgBox "4"
Case comEvReceive ' Received RThreshold # of chars.
InBuff = MSComm2.Input

'Call HandleInput(InBuff)
MsgBox InBuff
Case comEvSend ' There are SThreshold number of
MsgBox "5"
' characters in the transmit buffer.
Case comEvEOF ' An EOF character was found in the
MsgBox "6"
' input stream.
End Select


End Sub



上面程序运行后,,,拨通手机,然后接通,挂断通话,这整个过程结速后会返回一个"OK". 现在我想请教各位朋友在(第2步)接通后我怎么让对方手机给程序返回一个结果? 最好麻烦哪位朋友贴代码...不胜感激.






...全文
86 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
chineseProgram 2010-05-30
  • 打赏
  • 举报
回复
继续等待..................
chinaboyzyq 2010-05-25
  • 打赏
  • 举报
回复
sf.
贝隆 2010-05-24
  • 打赏
  • 举报
回复
呵呵,兄弟,这个是有通信归约的,不是说你让返回就返回,这个你的问开发者。

1,453

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧