vb高手进来帮帮忙 急啊
PrivateSubCommand5_Click()Dima()AsByteDimb()AsByteDimc()AsBytea=LoadResData(101,"CUST...
Private Sub Command5_Click()
Dim a() As Byte
Dim b() As Byte
Dim c() As Byte
a = LoadResData(101, "CUSTOM")
b = LoadResData(102, "CUSTOM")
c = LoadResData(103, "CUSTOM")
Form2.Text2.Text = StrConv(a, vbUnicode) & vbCrLf & vbCrLf & vbCrLf & StrConv(b, vbUnicode) & vbCrLf & vbCrLf & vbCrLf & StrConv(c, vbUnicode)
End Sub
按钮的意思是 在text2.text中显示资源里面的内容
运行时 正常
但是把它生成工程后 在打开生成的工程 text2.text中 只显示了资源 StrConv(a, vbUnicode) 中的内容 后面的两个没显示 怎么回事?
急 好了再加分 展开
Dim a() As Byte
Dim b() As Byte
Dim c() As Byte
a = LoadResData(101, "CUSTOM")
b = LoadResData(102, "CUSTOM")
c = LoadResData(103, "CUSTOM")
Form2.Text2.Text = StrConv(a, vbUnicode) & vbCrLf & vbCrLf & vbCrLf & StrConv(b, vbUnicode) & vbCrLf & vbCrLf & vbCrLf & StrConv(c, vbUnicode)
End Sub
按钮的意思是 在text2.text中显示资源里面的内容
运行时 正常
但是把它生成工程后 在打开生成的工程 text2.text中 只显示了资源 StrConv(a, vbUnicode) 中的内容 后面的两个没显示 怎么回事?
急 好了再加分 展开
2个回答
展开全部
Private Sub Command5_Click()
Dim a() As Byte
Dim b() As Byte
Dim c() As Byte
Dim a1 As String, b1 As String, c1 As String
a = LoadResData(101, "CUSTOM")
b = LoadResData(102, "CUSTOM")
c = LoadResData(103, "CUSTOM")
a1 = StrConv(a, vbUnicode)
b1 = StrConv(b, vbUnicode)
c1 = StrConv(c, vbUnicode)
If InStr(a1, Chr(0)) > 0 Then
a1 = Left(a1, InStr(a1, Chr(0)) - 1)
End If
If InStr(b1, Chr(0)) > 0 Then
b1 = Left(b1, InStr(b1, Chr(0)) - 1)
End If
If InStr(c1, Chr(0)) > 0 Then
c1 = Left(c1, InStr(c1, Chr(0)) - 1)
End If
Form2.Text2.Text = a1 & vbCrLf & vbCrLf & vbCrLf & b1 & vbCrLf & vbCrLf & vbCrLf & c1
End Sub
改这样试试
Dim a() As Byte
Dim b() As Byte
Dim c() As Byte
Dim a1 As String, b1 As String, c1 As String
a = LoadResData(101, "CUSTOM")
b = LoadResData(102, "CUSTOM")
c = LoadResData(103, "CUSTOM")
a1 = StrConv(a, vbUnicode)
b1 = StrConv(b, vbUnicode)
c1 = StrConv(c, vbUnicode)
If InStr(a1, Chr(0)) > 0 Then
a1 = Left(a1, InStr(a1, Chr(0)) - 1)
End If
If InStr(b1, Chr(0)) > 0 Then
b1 = Left(b1, InStr(b1, Chr(0)) - 1)
End If
If InStr(c1, Chr(0)) > 0 Then
c1 = Left(c1, InStr(c1, Chr(0)) - 1)
End If
Form2.Text2.Text = a1 & vbCrLf & vbCrLf & vbCrLf & b1 & vbCrLf & vbCrLf & vbCrLf & c1
End Sub
改这样试试
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询