Hex-Value in Visual Basic

前端 未结 4 1608
夕颜
夕颜 2021-01-03 18:15

Can someone just help me refresh my mind?

How do you specify hex values in a Visual Basic 6 / VBScript Source?

It\'s not 0xABCD as it is in

相关标签:
4条回答
  • 2021-01-03 18:45

    &H<hex-value> if my memory serves my correctly.

    Like: &HABCD

    0 讨论(0)
  • 2021-01-03 18:52

    Try &HABCD, that's how it works for most BASIC languages.

    0 讨论(0)
  • 2021-01-03 18:54

    VBScript \ VBA \ VB6 (and lower):

    Dim MyValue As Integer
    MyValue = &h1234
    

    VB (.NET Framework):

    Dim MyValue As Integer = &h1234
    

    Versions are usually backwards compatible syntax-wise, you cannot always use newer syntax in older versions.

    0 讨论(0)
  • 2021-01-03 18:56

    msgbox hex(255)

    0 讨论(0)
提交回复
热议问题