2.4 oncomm事件程序 根据rthreshold属性设置值,当接收缓存区内接收到相应字节的字符时,引发oncomm事件,在中断程序中接收数据。 sub mscomm1-oncomm () select case mscomm1.commevent ’在此可插入处理各种不同错误或事件的代码 case mscomm-ev-receive receivestring$=mscomm1.input select case mscomm1.rthreshold case r-periodic-byte ’周期性命令的应答数据 call disposedata(periodic-command) ’处理接收数据 during periodic=false ’设置周期性命令数据传输状态为结束 case r-nonperiodic-byte ’非周期性命令的应答数据 call disposedata(nonperiodic-command) ’处理接收数据 during-nonperiodic=false ’设置非周期性命令数据传输状态为结束 end select end select end sub 随着vb版本的不断升级,vb将成为最快速、易用、强劲的应用开发工具,是企业级客户/服务器应用软件开发的首选工具之一。 |
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>
正在阅读:Visual Basic通信程序设计Visual Basic通信程序设计
2004-02-14 09:34
出处:eNet学院
责任编辑:zwg
键盘也能翻页,试试“← →”键