1 Replies - 1065 Views - Last Post: 06 February 2013 - 09:33 PM Rate Topic: -----

#1 little_prince41  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 68
  • Joined: 10-August 07

Problem : Convert Decimal to Hex

Posted 06 February 2013 - 06:46 PM

Hello!


I have a problem about convert decimal to hex format, I need to convert decimal to hex format 2 digit.
Exp. "1000"(dem) to "03 E8" , can someone help me.
Is This A Good Question/Topic? 0
  • +

Replies To: Problem : Convert Decimal to Hex

#2 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Problem : Convert Decimal to Hex

Posted 06 February 2013 - 09:33 PM

View Postlittle_prince41, on 06 February 2013 - 07:46 PM, said:

I have a problem about convert decimal to hex format, I need to convert decimal to hex format 2 digit.
Exp. "1000"(dem) to "03 E8" , can someone help me.

Just a few examples. I'll leave it up to you to do the entire formatting in whatever way you want.
        Dim value As Integer = 1000
        Debug.Print(value.ToString("X"))
        Debug.Print(value.ToString("X4"))
        Debug.Print((value \ 256).ToString("X2"))
        Debug.Print((value Mod 256).ToString("X2"))


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1