Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. hexadecimal conversion

hexadecimal conversion

Scheduled Pinned Locked Moved Visual Basic
comhelp
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aswd
    wrote on last edited by
    #1

    hii all..i want the user to enter hexedecimal valuein the text box, so i need to convert it..but i dont know how..anyone can help me plss this is my email: hafizul_10422@yahoo.com :)

    A A R 3 Replies Last reply
    0
    • A aswd

      hii all..i want the user to enter hexedecimal valuein the text box, so i need to convert it..but i dont know how..anyone can help me plss this is my email: hafizul_10422@yahoo.com :)

      A Offline
      A Offline
      Ashutosh Phoujdar
      wrote on last edited by
      #2

      Click[^]:)

      dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility

      A 1 Reply Last reply
      0
      • A Ashutosh Phoujdar

        Click[^]:)

        dnpro "Very bad programmer" My Latest Articles RichTextBox Control with Find functionality LogViewer - A Simple Log Listening Utility

        A Offline
        A Offline
        aswd
        wrote on last edited by
        #3

        how to validate the hexadecimal value?? thanks for ur help!!

        1 Reply Last reply
        0
        • A aswd

          hii all..i want the user to enter hexedecimal valuein the text box, so i need to convert it..but i dont know how..anyone can help me plss this is my email: hafizul_10422@yahoo.com :)

          A Offline
          A Offline
          Alan N
          wrote on last edited by
          #4

          Hi, You can use the Parse or TryParse methods of the number types to do the conversion. This fragment in c# should get you started.

            String userInput = "ab7f";
            Int64 value = Int64.Parse(userInput, System.Globalization.NumberStyles.HexNumber);
          

          Alan N

          1 Reply Last reply
          0
          • A aswd

            hii all..i want the user to enter hexedecimal valuein the text box, so i need to convert it..but i dont know how..anyone can help me plss this is my email: hafizul_10422@yahoo.com :)

            R Offline
            R Offline
            riced
            wrote on last edited by
            #5

            What do want to convert it to? The assumption is that it's to integer but it could be to character or binary or unicode. E.g. 4C hex goes to: integer 76 binary 01001100 ASCII L EBCDIC <<br mode="hold" /> You really need to be specific when asking questions.

            A 1 Reply Last reply
            0
            • R riced

              What do want to convert it to? The assumption is that it's to integer but it could be to character or binary or unicode. E.g. 4C hex goes to: integer 76 binary 01001100 ASCII L EBCDIC <<br mode="hold" /> You really need to be specific when asking questions.

              A Offline
              A Offline
              aswd
              wrote on last edited by
              #6

              I’m stuck on how to enter a HEX number into a text box

              G 1 Reply Last reply
              0
              • A aswd

                I’m stuck on how to enter a HEX number into a text box

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                Strictly speaking, what you are asking for is actually not possible. There is nu such thing as a hexadecimal numbe, you either have a number or the hexadecimal textual representation of a number. Converting the textual representation into a number is called parsing. Entering the hexadecimal textual representation of the number in a textbox is easy. Make sure that the textbox has focus (you will see the blinking caret in the tectbox), then you just push keys on the keyboard to enter characters in the textbox. Valid characters for the hexadecimal representation are the digits 0 to 9 and the letters A to F. The letters can be either upper case or lower case.

                Despite everything, the person most likely to be fooling you next is yourself.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups