|
-
Sep 1st, 2000, 01:21 PM
#1
Thread Starter
Junior Member
I didn't see a post on this so I'll toss it out here.
Just how do you write Hex values to a Binary registry key?
The registry demo program from this site chokes with a Type Mismatch eror when you enter a value such as 1F instead of 1.
Dim byTemp(2) As Byte
byTemp(0) = CByte(txtByte(0)) <---The error occurs here
byTemp(1) = CByte(txtByte(1))
byTemp(2) = CByte(txtByte(2))
SaveSettingByte HKEY_CURRENT_USER, "Software\VBW\RegistryDemo", "Byte", byTemp
Should something other than cbyte be used?
Or possibly change it to CByte("&H" & txtByte(0)) ?
Thanks,
James
-
Sep 1st, 2000, 01:24 PM
#2
Thread Starter
Junior Member
That appears to be it!
byTemp(0) = CByte("&H" & txtByte(0)
Adding &H to the beginning of the array value lets it be accepted as a hex value. That just occured to me as I was writing that last post.
Scary huh? Answered my own question that time... hehe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|