Is there any predefined property by which I can set the DisplayFormat/DisplayStyle of a textbox? Suppose I want a textbox to hold the actual value 888888888888.88 and show it formatted as 888,888,888,888.88. In short it should hold 'Double' data type value and show it with thousand separators and decimal places upto two digits. If text is cleared from the textbox, it should have 0 as value and 0.00 as displayed value. Also the number of digits in the textbox may vary accordingly. So how can it be done? Please help. Regards.

The best and simpliest option is to use MaskedTextBox (instead of TextBox).
You only have to define the mask property:

maskedTextBox1.Mask = "000,000,000,000.00"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.