troubleshooting Question

Hex addition and conversion

Avatar of scorpio05678
scorpio05678Flag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic Classic
5 Comments1 Solution432 ViewsLast Modified:
HI

I am writing an app which sends message to server/client and display them in the rich text box. All the messages send and recieved are displyed in Hex . Each line should display 16 hex pairs with their starting and end index(in 4 digit hex). I can display the starting and ending index in decimal but conversion to  Hex cause apps to display error

Current
********************
Text: "This is a test for displaying index in decimal and it appears to be working"

Hex:
0000-0015  54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 66    
0016-0031  6F 72 20 64 69 73 70 6C 61 79 69 6E 67 20 69 6E    
0032-0047  64 65 78 20 69 6E 20 64 65 63 69 6D 61 6C 20 61    
0048-0063  6E 64 20 69 74 20 61 70 70 65 61 72 73 20 74 6F    
0064-0073  20 62 65 20 77 6F 72 6B 69 6E 67  

**********************

Should be
**********************
0000-000F  54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 66    
0010-001F  6F 72 20 64 69 73 70 6C 61 79 69 6E 67 20 69 6E    
0020-002F  64 65 78 20 69 6E 20 64 65 63 69 6D 61 6C 20 61    
0030-003F  6E 64 20 69 74 20 61 70 70 65 61 72 73 20 74 6F    
0040-004B  20 62 65 20 77 6F 72 6B 69 6E 67  
**********************                


anyone have an idea how to do Hex addition and decimal to Hex (4 digit ) conversion.

Thanks

SC
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros