VB简单问题,谢谢了
串口上来一串数,我想把这些数都保存到文本文件中,再上来的数接在前一串数后面保存,要上来就保存的,不用手动,请问怎么做,谢谢~
参考答案:socket_dataarrival()
dim msg,Alltext as string
msg=""
socket.getdata msg
Alltext=Alltext+msg
msg=""
open 路径+"Alltext.txt" for output as #1
write #1,Alltext
close #1
end sub
或者就用:
socket_dataarrival()
dim msg as string
msg=""
open 路径+"Alltext.txt" for output as #1
write #1,socket.getdata msg
close #1
end sub