Dim Instring As String
' Use COM1.
MSComm1.CommPort = 2
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True
' Send the attention command to the modem.
MSComm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that
' the modem responds with "OK".
' Wait for data to come back to the serial port.
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCrLf)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False
还有请问Buffer$是什么意思?
' Use COM1.
MSComm1.CommPort = 2
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True
' Send the attention command to the modem.
MSComm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that
' the modem responds with "OK".
' Wait for data to come back to the serial port.
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCrLf)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False
还有请问Buffer$是什么意思?
解决方案 »
- 怎样得到excel中某一列的实际长度?
- 在VB6中,如何快速找到一连串调用的函数和过程(指自己编写的函数和过程),以便修改代码。因为用“查找”方法太不方便。
- 我用Webbrower控件打开word,excel,powerpoint文件,但打开后Webbrower控件并不显示word,excel,powerpoint的菜单和工具栏,怎样让其
- 如何实现象CUTEFTP pro 左边和底部的管理器的浮动窗口功能呢?
- 请教诸位
- 送分问题:下面2个写法有什么不同?
- 如何找将数据库以表的形式打印出来?
- 英语
- 如何实现表格控件中的下拉框
- ÕÕ 看来CSDN上真的没有高手了,怎么这样的问题也回答不了
- 自己做了个控件,大家看看有没有用?
- 不改变Text中的文字属性,而是改变与Text相连的数据库中文字的属性
$--string,%--integer,!--single,@--currency,#--double,&--long
可以直接通过这种方式声明变量类型