GetBit - method of object Pm
Getting the bit of the variable.
GetBit(Value As Variant, nIndex As Integer) As Boolean
b = Pm.GetBit(Value, nIndex)
|Value||(Variant) Variable whose bit has to be checked up. The variable must be integer (Byte, Integer, Long).|
|nIndex||(Integer) Index of the bit in the variable (zero-based index).|
Return value true is here not -1, but 1, because the experience shows it more practical in this case.
1 - bit is set
0 - bit is not set
The method can also be called in the graphic item events for Web Panels
Getting the 20th bit in the BitMask variable
If Pm.GetBit(BitMask, 20) Then
... 'An action if the bit is set