Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   Help with my proggie (http://www.programmingforums.org/showthread.php?t=108)

TheBigBadWolf Jul 4th, 2004 12:14 AM

Hello!i'm new here pft,I've been programing from not too long like.....2 years ago i started to program
Well i need to make a program that has to do with HEXES
What i want is a button that takes you to an offset on the file and shows you the hex and the text that the hexes means using a table file on some text boxes
So you can edit the hex stuff much easier because some people get crazy seeing to much numbers.I want it to show the hexes on little text boxes and the text just in one text box,Also if i change the Text the HEX numbers have to change their value that the letter means obiously ok?
Well could some one help me with the codes and stuff?Well thanks

Ooble Jul 12th, 2004 6:57 AM

What do you mean? If you mean a hex editor, then take a look at the TextBox_Change property.

Pizentios Jul 13th, 2004 8:47 AM

In vb there is a HEX function. It returns the hex value of a number.

Example:

:

Dim MyHex
MyHex = Hex(5)  ' Returns 5.
MyHex = Hex(10)  ' Returns A.
MyHex = Hex(459)  ' Returns 1CB.


Anyways, i am going to look around some more and see what i can find, havn't used much hex myself.

Ooble Jul 13th, 2004 8:49 AM

By the way, if you want to convert it back to decimal from Hex, use:
:

decCode = Val ("&H" & hexCode)

Pizentios Jul 13th, 2004 9:30 AM

Here's a function you might be interested in:

:

Public Function hex2ascii(ByVal hextext As String) As String
 * *
For y = 1 To Len(hextext)
 * *num = Mid(hextext, y, 2)
 * *Value = Value & Chr(Val("&h" & num))
 * *y = y + 1
Next y

hex2ascii = Value
End Function


It suppost to change a hex value into it's Ascii version. I havn't tested it at all, but it's a start. Found it after a few minutes of googling. Good luck and let us know how things go.

Ooble Jul 13th, 2004 9:34 AM

I can't be arsed to test it, but it looks fine.


All times are GMT -5. The time now is 8:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC