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. Percentage

Percentage

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 4 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.
  • S Offline
    S Offline
    Syasyaaa
    wrote on last edited by
    #1

    How do you make an input that the user key in a textbox to be a percentage number?

    A D T 3 Replies Last reply
    0
    • S Syasyaaa

      How do you make an input that the user key in a textbox to be a percentage number?

      A Offline
      A Offline
      Andy_L_J
      wrote on last edited by
      #2

      Ummmm, Divide (/) by 100 :doh:

      I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife

      1 Reply Last reply
      0
      • S Syasyaaa

        How do you make an input that the user key in a textbox to be a percentage number?

        D Offline
        D Offline
        Dalek Dave
        wrote on last edited by
        #3

        Just make it a number and put a label with "%" in it behind. Then on change parse the value to % Easier than messing around with controlling inputs.

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave

        1 Reply Last reply
        0
        • S Syasyaaa

          How do you make an input that the user key in a textbox to be a percentage number?

          T Offline
          T Offline
          The Man from U N C L E
          wrote on last edited by
          #4

          Use a NumericUpDown with the max/min set to 100/0, and a label next to it for the % sign.

          If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

          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