Hexadecimal Conversion
I'm trying to make a program that determines colors for HTML, and I am showing both RGB to Hex and Hex to RGB. Is there anything built into VB that will automatically convert between the two, or do I have to code that myself? Also, if I have to code it, how do I do it, and is there anything online already done that does this?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Hexadecimal Value Conversion
I’m reading a file that has some records containing some hexadecimal value of 00 (x’00’); how can I replace this value with blanks. I’m trying REPLACE function, but I don’t how to identify this hexadecimal value.
Thanks in advance for your help.
Jorge.
Conversion Binary To Binary And Conversion Of Hexadecimal To Decimal In Calculator
Hi Folks
i was develop one scientific calculator
1) binary to binary conversion= for example we can add one binary value (1110) + another binary value(0101) = i want this output(100 1 1)but it comes 1211 this is my question how can i rectify ?
2) convert from hexadecimal to decimal conversions (ex)in decimal 12 to hexa is c . it wirks good ,but my question is how to convert hexadecimal to deimal (12) ?
Tks in Advance
----------------------------------------------------------------------
HARD WORK NEVER END FAILS"
Conversion From Hexadecimal Back To Decimal
Hi everyone,
Does anyone know how to convert a number in hexadecimal format back to decimal? The decimal number i have is previosly processed and stored inside a integer variable, intX. So i cannot simply write &HintX. Any suggestions?
Thanks!
Conversion From Hexadecimal Back To Decimal
Hi everyone,
Does anyone know how to convert a number in hexadecimal format back to decimal? The decimal number i have is previosly processed and stored inside a integer variable, intX. So i cannot simply write &HintX. Any suggestions?
Thanks!
Hexadecimal To Decimal Conversion (stupid Text Boxes Wont Work!)
I have two text boxes, txtDecimal and txtHexadecimal. When you type into the hex box, it converts and puts the converted value in the decimal box. But, when you type stuff into the hex box, it types backwards??
Like;
I put in 12345 and it comes out 12345
put in 03ED and it comes out DE3 ??
It seems to start going backwards as soon as i use a letter
BEE comes out as EEB etc
This is driving me nuts : ) I don't know what I'm doing wrong - the code for hex - dec conversion that im using is
txtDecimal.Text = Val("&h" & txtHexadecimal)
the conversion works, but the stupid text box wont behave!!
Hexadecimal
Hi all,
What i want to do is open up a reasonably small file (64k) with vb and display its hex contents in a texttbox. How would i do this? Thanks
Edit:
This is what i have so far
Code:
Private Sub Form_Load()
Dim Bytes() As Byte
Dim fileLength As Long
Dim fileName As String
Dim x As Long
fileName = "c:windowscalc.exe"
fileLength = FileLen(fileName)
ReDim Bytes(0 To (FileLen - 1))
Open fileName For Binary As #1
Get #1, 1, Bytes()
Close #1
x = 0
Do
text1.Text = text1.Text & Bytes(x)
text1.Text = text1.Text & " "
x = x + 1
Loop Until x = fileLength
End Sub
How do i convert the array Bytes() to hex values? Thanks
Hexadecimal Help
Is there a way to tell the cdec function that the hex string is a signed int.
For Example. if I say...
hex(-1644) = F994
but convert that back to a dec and I get
cdec("&HF994") = 63892
So I need some way of converting the hex back to dec as a signed int.
The only way I have foung is to add 4F's to the front of the hex num...
cdec("&HFFFFF994") = -1644
Is this the best way or am I missing something.
Thanks
Brian
Hexadecimal Big Value
Hi everone... I have this huge hexa value
33B7DD45A01E0EDF8F7CCBE85CB0DA5D40CC2E812B502D4E
do you know how I can convert it to numeric??? What is the code??
Thanks
How Do I Get Hexadecimal With Vb
I have a html editor that is start to look pretty good but i need to know how to change the integer i get for a hexadeicmal number.
Is there an api that can be used or is it that i have to code all the possiblity i really hope not.
thanks peace
Hexadecimal
I am trying to extract version info using the GetVersionInfo API. I am at the point of extracting the data from the VS_VERSIONINFO structure but how do I turn
108832896
into the easy to interpret
0x000?00??
format?
Oh and what is a bitmask and how do hi and lo words work when using dwords?
Hexadecimal
How can I change a decimal number to a hexadecimal number?
Hexadecimal
I know how to convert intergers to Hexa but, how do I convert hexa to integers?
Thanx in advance
Using Hexadecimal In VB?
How do I get VB to read the information from a file from a certain Hexadecimal location? So if I were to read something from a file at hexadecimal address of A5? How would I do it?
thanks
Color Conversion - Conversion Problem?
Hi all,
I want to convert color schemes used in web to the compatible windows colors. I have a color code #EFF5FC. how do i convert it so that i can use it in vb backcolor.?
.
.........
When you are laughing, you are in a state of meditation.
b'caz laughing and thinking cannot be done together.
Hexadecimal Problem
a hexadecimal number: C1EC7ED3
Converted in Visual Basic = -1041465645
Print CDec(&HC1EC7ED3)
or
Print CDec("&H" & C1EC7ED3)
In the Windows Calculator program = 3253501651
How come this is happening?? I want to get a result like in the calculator.
Hexadecimal Date
Dear All
I tried - unsuccessfully - to solve this apparently simple question.
From my application in VB I have imported some data from a dbf file.
One of this data is an exadecimal figure which corresponds to a Date/Time, for example: 2E9E5AC8 is compound by 2 bytes: the first (2E9E) indicates the date in short format, and the second (5AC8) indicates the time in short format.
The same documentation says that it is possible to explicit the above date and time by using two API Functions: DOSGetDateShort and DOSGetTimeShort, but I really cannot find them anywhere.
Have you got some good suggestions to retrieve the date and time in decimal notation from the above?
For yr guidance 2E9E should read 30Apr2003 5AC8 I don't know.....
Thank You to everyone
Best Regards
Tdp
Binary To Hexadecimal
im looking for a sample to insert a binary file (image) to a database as text (hexadecimal/base64 encoded), ill be using this for my frontend application to update my database remotely where i also have my binary file (image) on a MySQL database.
Hexadecimal Codes
How would I print a Hex code to my Default Printer. I'm trying to Print 1B 52 n ??
Thanks in advance
DWORD Hexadecimal
How can I pass a hexadecimal value (0x00000001) for a DWORD setting value in the registry through the API function
RegSetValueEx ????
Thanks in advance!!
Hexadecimal To Decimal?
i am trying to convert a hexadecimal color to 3 seperate rgb values, buti am having trouble converting the hex value (eg FF) to a decimal number (255).
is there any simple way of doing this?
i have tried the CLng but that returns a type mismatch =/
Hexadecimal To Ascii
Hi, I've a string in hex and I need translate it to ASCII, this string comes from a cash box and contains the names off all the products in the cash box memory. Any Idea? It is a line per product but I can handle this. Only need translate a string from Hex to Ascii...
Hexadecimal Notation
In VB you specify a hexadecimal number with the prefix "&H" and upper case letters for the digits above 9, so "&H15A8" for example.
What then are the numbers that I see specified in the form "0x12be3"? Is this simply a different notation style for hexadecimal numbers? Couldn't find the answer in the help files.
Random Hexadecimal?
Hi,everyone?
How can i generate a random hexadecimal and integer number?
Thanks.
Help! Hexadecimal Colors
I need help!
How can i get a color's number from decimel to hexadecimal?
for xample, the color 7888898 in decimel, is 786002 in hexadecimal. can some plz help me and tell me how can i get a color's number (THE SAME COLOR) in hexadecimal values?
tnx very much!
Hexadecimal Question
Help,
How would I create a key to be hexadecimal for the registry.
I tried using REG_BINARY=3, and REG_DWORD=240.
But for some reason, it doesnt come out hexadecimal.
When I try either one and look them up in the reg ( the keys i just created ) they do not have a Base option to choose decimal or hexa.
The registry keys allready in the computer do have this option. What am i doing wrong.
Thanks.
ps this is what im trying to fix.
Key: [HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor]
Value Name: DefaultColor
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = default)
For some reason mine stays binary.
[Edited by help on 01-04-2001 at 11:39 PM]
Doing Hexadecimal Math
I am trying to make a program that will do math in the Hexadecimal system but I have no idea how to set it up to do the math in Hex.
Here's a more detailed explination of what I want to do:
The user inputs an 8-digit hexadecimal into a text field, then there are 6 buttons. By clicking 1 of the buttons, it subtracts a hexadecimal value specified by the button (ex. 4C0) from the inputed value and displays it in another text field.
Could somebody assist me in making this over AOL or something? Or be a really nice person and make the program for me? I could do some graphics for you if you wanted in exchange... anything in web design I can do...
AOL Name: Kukyfrope2
IM me if you can or want to try and help me!
Thanks!
Kuky
Hexadecimal Variables???????
I have inside of string a hexadecimal value:
strHexa="045f456678eddfeadfe345629000a1001010e............
Its long is nerly to 4090 characters. This string update a hexadecimal fields in a table. When I need update this field using this string, its is converted in other value, of course, its is a string and not hexadecimal value. In the update moment this makes a converts to hexadecimal value. If I try convert this string to decimal, when had pass 200 characters occurs a overflow error, using a double, its value is over 1.79.....E+308. I think that using a Hexadecimal Variable, the update do not make a convert, and take this value, inside of the variable as hexadecimal value to upate.
Please. Are there some way to declarate a hexadecimal value. Or to converts from too long or bigger Hexadecimal to decimal value????
Thanks to all!!!!!!!!!!1
Bye
Juan Carlos Chacón
How To Represent A Hexadecimal Value In VB
Hello gurus,
How do you represent hexadecimal value in visual basic.
Take for example, what is the equivalent VB code of the C/C++ code below:
Code:
long color;
color = RGB(0x99, 0xCC, 0xFF);
Thanks in advance.
Owen
Hexadecimal As String In VB
Can someone explain how to return a string representation of a hexadecimal GUID in VB? In sql server the datatype is stored as binary with length of 16. When I run a query in sql server the result displays a hexadecimal with 32 characters. When I run this query from VB and display the result in VB I get "A??". I looked up MSDN and it told me that I need to store the hexadecimal as a binary array eg. dim arrayHex() as binary. I then build a string using the hex function hex(arrayHex(i)) for each element in the array, 16 elements in total. The result is a hexadecimal string representation of 24 characters instead of 32. I guess I do not fully understand hexadecimals. Thank you for any advice for this in advance.
Hexadecimal Color
Is it possible to use hex values consistently in run-time mode? I can use decimal 255 for red, but blue and green get converted wrong. I know about the RGB(r,g,b) command, but it's in decimal, and intellisense converts txtText.ForeColor = &H0000FF& to &HFF& ... any suggestions? Am using VB 6.0. Also, how to turn off Intellisense in VB?
Norman Spears
Hexadecimal Reference Values
I was wondering if anyone knew where I could find the hexadecimal reference values for the Open Dialog Box. I am looking to use an API but was needing to know what the reference values were for each of the components of the dialog box is. If anyone could help me, I thank you.
Read A File Hexadecimal
Hi, I want to read out a file.
But I want the hexadecimal values for each byte.
I can't just read it out normally and convert the returning characters to hex, because every character VB doesn't know, it converts to question marks (?).
Has anybody a suggestion on how to do that?
Aanother thing: Has VB an Assembler? Maybe I can try to assemble something....
String -> Hexadecimal && Another Question
Is it possible to convert a string into a hexadecimal value?
Other question: In php there's a function called MD5. It encrypts a string so that it's not decryptable. Does a similiar function exist in VB? Or are there other encryption functions (decryptable or not)?
Hexadecimal Regedit Store?
is that possible?
may i write regedit values in HEX?
i just can write them like strings
i use this module:
Code:
Public Sub CreateKey(Folder As String, Value As String)
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite Folder, Value
End Sub
Public Sub CreateIntegerKey(Folder As String, Value As Integer)
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite Folder, Value, "REG_DWORD"
End Sub
Public Function ReadKey(Value As String) As String
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
r = b.RegRead(Value)
ReadKey = r
End Function
Public Sub DeleteKey(Value As String)
Dim b As Object
On Error Resume Next
Set b = CreateObject("Wscript.Shell")
b.RegDelete Value
End Sub
sorry my fault!!! this module is the corroct one!
Vb6 Changing The Backcolor Using Hexadecimal
here's my propblem .....
I have a text box with a hexadecimal code in such as '#00ff00'.
I also have a command button. Whn i click that button i want its back color to change to the color of the code in the text box.
Can it be done and if so, how?
all help appreciated.
|