Hex-Value in Visual Basic

2019-02-16 06:34发布

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 C++, that's what I can remember... It was something similar... But what?

4条回答
forever°为你锁心
2楼-- · 2019-02-16 07:08

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

Like: &HABCD

查看更多
该账号已被封号
3楼-- · 2019-02-16 07:09

msgbox hex(255)

查看更多
等我变得足够好
4楼-- · 2019-02-16 07:14

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

查看更多
Lonely孤独者°
5楼-- · 2019-02-16 07:23

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.

查看更多
登录 后发表回答