标题:Axwinsock控件接收
只看楼主
yushenjueli
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2020-3-11
 问题点数:0 回复次数:0 
Axwinsock控件接收


程序代码:
Private Sub AxWinsock1_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles AxWinsock1.DataArrival
        Dim str As String
        Dim r As Integer
        Dim s As String
        Dim receive As Byte
        str = ""
        r = AxWinsock1.BytesReceived
        AxWinsock1.GetData(receive, vbByte, r)
        s = Hex(receive)
        TextBox1.Text = TextBox1.Text & s & " "
        If controlmode = 4 Then     '设备通信

        End If
    End Sub

设备通过串口转TCP模块,发送指令,PC端用Axwinsock接收,上述代码单字节接收没问题,请问如何多字节接收?
搜索更多相关主题的帖子: 接收 控件 Text Dim String 
2020-03-11 19:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-499711-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.202093 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved