Convert hex value to a decimal value in VB6

前端 未结 8 2113
日久生厌
日久生厌 2021-02-20 04:08

How can I convert a hex value to a decimal value in VB6?

I\'m trying just to see if this works:

Dim hexVal as string
hexVal = \"#7B19AB\"
clng(\"&H\         


        
相关标签:
8条回答
  • 2021-02-20 04:34

    Get rid of the number sign (#) in the hexVal string.

    0 讨论(0)
  • 2021-02-20 04:37
    Dim hexVal As String
    Dim str As String
    Dim uzunluk As Integer
    
    On Error Resume Next
    
    hexVal = "#7B19AB" 
    
    str = Replace(hexVal, "#", "")
    Text1.Text = str
    
    uzunluk = Len(Text1.Text) 
    
    For i = 0 To uzunluk 
        Text1.SelStart = i 
        Text1.SelLength = 1 
        Print Hex(Asc(Text1.SelText))
    Next i
    
    0 讨论(0)
提交回复
热议问题