如上!

解决方案 »

  1.   

    把十六进制数转换成字符串?
    ? cstr(hex(&HFF))
    FF
    楼主说的是这个意思吗?
      

  2.   

    楼上不是画蛇添足吗?HEX返回的就是STRING,何必再加什么CSTR?
      

  3.   

    现有函数
    Public Function strtohex(ByVal strs As String) As String
        Dim abyts() As Byte
        Dim byttemp As Byte
        Dim strtemp As String
        Dim llocation As Long
        
        abyts = StrConv(strs, vbFromUnicode)
        For llocation = 0 To UBound(abyts)
            byttemp = abyts(llocation)
            strtemp = Hex(byttemp)
            strtemp = Right("00" & strtemp, 2)
            strtohex = strtohex & strtemp
        Next llocation
    End Function
    由strtohex("中国")得到"D6D0B9FA"
    现在想由"D6D0B9FA"得到"中国"
    谢谢
      

  4.   

    province_(雍昊) ( ) 信誉:100  2006-08-11 11:20:00  得分: 0  
    楼上不是画蛇添足吗?HEX返回的就是STRING,何必再加什么CSTR?呵呵,刚才有点小晕
      

  5.   

    Public Function hextostr(ByVal strs As String) As String
    Dim i As Integer, tmp As StringIf Len(strs) Mod 2 Then Exit FunctionFor i = 1 To Len(strs) Step 2
        n = Val("&H" & Mid(strs, i, 2)) 
        If n < 0 Or n > 127 Then
            n = Val("&H" & Mid(strs, i, 4)) 
            i = i + 2
        End If
        tmp = tmp & Chr(n)
    Next i
    hextostr = tmp
    End Function
      

  6.   

    我这有个VB.NET的Dim strSrc As String = "`ET-CT/东部"
            Dim arr As Byte() = System.Text.Encoding.Default.GetBytes(strSrc)
            Dim i As Integer
            Dim strDest As String
            For i = 0 To UBound(arr) - 1
                strDest += Convert.ToString(arr(i), 16)
            Next
    具体见
    http://community.csdn.net/Expert/topic/4939/4939614.xml?temp=5.904788E-02