如何将Byte数组的一部分赋值给一个字符串?急!! 比如Dim b(1 to 20) As Byte如何将Byte数组b(5)到b(10) 赋值给字符串s? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Dim a() As Byte Dim c As String c = "12345678997" a() = c c = "" c = ac = Mid(c, 5, 10-5) Dim a(1 To 20) As Byte Dim j For j = 1 To 20 a(j) = Asc(j) Next Dim c As String c = "" For j = 5 To 10 c = c & Chr$(a(j)) Next Dim a(20) As Bytedim s as strings=a '这儿也许根据需要用strconvs=mid(a,x,y) 测试通过Private Sub Command1_Click() Dim n As Long Dim arrBytes() As Byte '读出二进制数据到数组 Open "d:\draw.ico" For Binary As 1 n = LOF(1) ReDim arrBytes(1 To n) As Byte Get 1, , arrBytes Close 1 '读取二进制数组数据到字符串 Dim fileCon As String Dim i As Long For i = 10 To 150 fileCon = fileCon & CStr(arrBytes(i)) Next MsgBox fileCon End Sub 一个for和连接运算符"&"不就OK了! 请高手帮忙VB代码问题 求一个比较难的思路算法? 大家来讨论VB更新可执行文件 dll返回数据库recordset 如何为用vb创建的active控件创建安全证书 自己设计的控件不能放在MDI窗体中? 求教这个SQL语句怎么写啊 控件和COM 的区别是什么? VB ListView 中如何判断那些复选框是被选中的,那些不是? 亟待回复,如何用vb调用MicroSoft标准Ado连接窗口,并且获得连接字符串 为什么没有触发事件 急急急!
Dim c As String
c = "12345678997"
a() = c
c = ""
c = a
c = Mid(c, 5, 10-5)
Dim j
For j = 1 To 20
a(j) = Asc(j)
Next
Dim c As String
c = ""
For j = 5 To 10
c = c & Chr$(a(j))
Next
dim s as strings=a '这儿也许根据需要用strconv
s=mid(a,x,y)
Private Sub Command1_Click()
Dim n As Long
Dim arrBytes() As Byte
'读出二进制数据到数组
Open "d:\draw.ico" For Binary As 1
n = LOF(1)
ReDim arrBytes(1 To n) As Byte
Get 1, , arrBytes
Close 1
'读取二进制数组数据到字符串
Dim fileCon As String
Dim i As Long
For i = 10 To 150
fileCon = fileCon & CStr(arrBytes(i))
Next
MsgBox fileCon
End Sub
一个for和连接运算符"&"不就OK了!