To Set BINARY values from the registry
To Set BINARY values from the registry
API Declarations
Dim i As Long
Dim lC As Long
Dim bR As Byte
Dim bG As Byte
Dim bB As Byte
Dim bOut() As Byte
Rate To Set BINARY values from the registry
(2(2 Vote))
' QBColors:
ReDim bOut(0 To 15 * 3 - 1) As Byte
For i = 1 To 15
' Get the Red, Green, Blue for the QBColor at index i:
lC = QBColor(i)
bR = (lC And &HFF&)
bG = ((lC And &HFF00&) \ &H100&)
bB = ((lC And &HFF0000) \ &H10000)
' Add Red, Green, Blue to the byte array to store:
bOut((i - 1) * 3) = bR
bOut((i - 1) * 3 + 1) = bG
bOut((i - 1) * 3 + 2) = bB
Next i
' Store it:
With cR
.ClassKey = HKEY_CURRENT_USER
.SectionKey = "software\vbaccelerator\cRegistry\Binary Test"
.ValueKey = "QBColors"
.ValueType = REG_BINARY
.Value = bOut()
End With
To Set BINARY values from the registry Comments
No comments yet — be the first to post one!
Post a Comment