在发送文本框中发送中文字符,怎么才能在接收框中显示同样的中文字符??
比如我在发送窗口中发送“我们”,现在接收窗口中收到的是"我们”的ASC码“CE D2 C3 C7”,怎么在接收窗口中显示中文字符“我们”?????
请教各位!!先谢!!
比如我在发送窗口中发送“我们”,现在接收窗口中收到的是"我们”的ASC码“CE D2 C3 C7”,怎么在接收窗口中显示中文字符“我们”?????
请教各位!!先谢!!
调试欢乐多
txtRecieved = ""
For i = 1 to Len(strRecieved) Step 2
intTemp = Val("&H" & Mid(strRecieved, i, 2))
If intTemp > 127 Then
intTemp = Val("&H" & Mid(strRecieved, i, 4))
i = i + 2
End If
txtRecieved = txtRecieved & Chr(intTemp)
Next i
Dim i As Integer
Dim strRecieved As StringstrRecieved = Replace(TextRev.Text," ","")
TextRev.Text = ""
For i = 1 to Len(strRecieved) Step 2
intTemp = Val("&H" & Mid(strRecieved, i, 2))
If intTemp > 127 Then
intTemp = Val("&H" & Mid(strRecieved, i, 4))
i = i + 2
End If
txtRecieved = txtRecieved & Chr(intTemp)
Next i
这段代码可以显示汉字,但是显示几个汉字后报"实时错误 7 内存溢出"错误??什么原因???
继续请教各位!!