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. C#
  4. TextBox

TextBox

Scheduled Pinned Locked Moved C#
question
3 Posts 3 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
    sasan56
    wrote on last edited by
    #1

    Hi Dear I use VS2005 , in windows app i want to have a thousand separator for numbers that shown in Textbox or MaskTextBox. How can i do that?

    A H 2 Replies Last reply
    0
    • S sasan56

      Hi Dear I use VS2005 , in windows app i want to have a thousand separator for numbers that shown in Textbox or MaskTextBox. How can i do that?

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      thousand separator means ?? :confused::confused: Do you want to create a custom textbox control??

      Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
      Create .NET Templates

      1 Reply Last reply
      0
      • S sasan56

        Hi Dear I use VS2005 , in windows app i want to have a thousand separator for numbers that shown in Textbox or MaskTextBox. How can i do that?

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #3

        Either use string.Format() or numberVariable.ToString(string formatString) to set the text for the TextBox

        // Either
        myTextBox.Text = string.Format(formatString goes here, numberVariable);

        // Or
        myTextBox.Text = numberVariable.ToString(format string goes here);

        I'll leave you to look up format strings in MSDN.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        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